X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=engines%2Fcpu.c;h=8bc9fd5c3c8c8919d4618bf6f149fb5b142093a6;hp=dd69cedeaff7ee438fb284198dc2b91ad5f2b785;hb=a1c58075279454a91ec43366846b93e8dcf9753c;hpb=f4e62a5f3640dfe2d2119bbe1e40bf57747f6564 diff --git a/engines/cpu.c b/engines/cpu.c index dd69cede..8bc9fd5c 100644 --- a/engines/cpu.c +++ b/engines/cpu.c @@ -9,25 +9,10 @@ static int fio_cpuio_queue(struct thread_data *td, struct io_u fio_unused *io_u) { - __usec_sleep(td->o.cpucycle); + usec_spin(td->o.cpucycle); return FIO_Q_COMPLETED; } -static int fio_cpuio_setup(struct thread_data fio_unused *td) -{ - struct fio_file *f; - unsigned int i; - - for_each_file(td, f, i) { - if (td->o.size) - f->real_file_size = td->o.size / td->o.nr_files; - else - f->real_file_size = -1ULL; - } - - return 0; -} - static int fio_cpuio_init(struct thread_data *td) { struct thread_options *o = &td->o; @@ -62,9 +47,8 @@ static struct ioengine_ops ioengine = { .version = FIO_IOOPS_VERSION, .queue = fio_cpuio_queue, .init = fio_cpuio_init, - .setup = fio_cpuio_setup, .open_file = fio_cpuio_open, - .flags = FIO_SYNCIO | FIO_DISKLESSIO, + .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_NOIO, }; static void fio_init fio_cpuio_register(void)