.type = FIO_OPT_INT,
.off1 = offsetof(struct cpu_options, cpuload),
.help = "Use this percentage of CPU",
- .category = FIO_OPT_C_GENERAL,
+ .category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
{
.def = "50000",
.parent = "cpuload",
.hide = 1,
- .category = FIO_OPT_C_GENERAL,
+ .category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
{
.off1 = offsetof(struct cpu_options, exit_io_done),
.help = "Exit when IO threads finish",
.def = "0",
- .category = FIO_OPT_C_GENERAL,
+ .category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
{
};
-static int fio_cpuio_queue(struct thread_data *td, struct io_u fio_unused *io_u)
+static enum fio_q_status fio_cpuio_queue(struct thread_data *td,
+ struct io_u fio_unused *io_u)
{
struct cpu_options *co = td->eo;
*/
o->thinktime_blocks = 1;
o->thinktime_spin = 0;
- o->thinktime = (co->cpucycle * (100 - co->cpuload)) / co->cpuload;
+ o->thinktime = ((unsigned long long) co->cpucycle * (100 - co->cpuload)) / co->cpuload;
o->nr_files = o->open_files = 1;
- log_info("%s: ioengine=cpu, cpuload=%u, cpucycle=%u\n", td->o.name,
- co->cpuload, co->cpucycle);
+ log_info("%s: ioengine=%s, cpuload=%u, cpucycle=%u\n",
+ td->o.name, td->io_ops->name, co->cpuload, co->cpucycle);
return 0;
}