X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=ioengines.c;h=01492bcf5645434bac6dee82f3c89a1dcf6d9b06;hp=a78088ddb8753e32d5ad9c97cfbdd92ad64b8e55;hb=b990b5c06801d6d25e3fcc5415efbbe7bb23341e;hpb=aae22ca71e8f5ac94a79f5dee161533a25852f6c diff --git a/ioengines.c b/ioengines.c index a78088dd..01492bcf 100644 --- a/ioengines.c +++ b/ioengines.c @@ -918,3 +918,17 @@ int fio_spliceio_init(struct thread_data *td) } #endif /* FIO_HAVE_SPLICE */ + +int fio_cpuio_init(struct thread_data *td) +{ + if (!td->cpuload) { + td_vmsg(td, EINVAL, "cpu thread needs rate"); + return 1; + } else if (td->cpuload > 100) + td->cpuload = 100; + + td->read_iolog = td->write_iolog = 0; + td->fd = -1; + + return 0; +}