Current cpu ioengine always bruns out 100 percent cpu cycles
no matter what the cpuload value is. Since no data is transferred
with cpuio, bytes_done would be ZERO. Consequently, think_time
is omitted and loops keeps running.
A cpuio example is added as well.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
static int fio_cpuio_queue(struct thread_data *td, struct io_u fio_unused *io_u)
{
usec_spin(td->o.cpucycle);
+
+ if (io_u->buflen == 0)
+ io_u->buflen = 1;
+ io_u->resid = 0;
+
return FIO_Q_COMPLETED;
}
--- /dev/null
+[global]
+ioengine=cpuio
+time_based
+runtime=10
+
+[burn50percent]
+cpuload=50
+