[PATCH] Basic support for a cpu cycle eater job
This will allow you to put some cpu load on the box, while other
threads are doing IO.
diff --git a/ioengines.c b/ioengines.c
index a78088d..01492bc 100644
--- a/ioengines.c
+++ b/ioengines.c
@@ -918,3 +918,17 @@
}
#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;
+}