Add gtod_cpu option for pinning gettimeofday() to a single CPU
Similar to what real life products sometimes do, offload gettimeofday()
calls to a single CPU and have that update the current time into a shared
memory location. This option pins a specific CPU for that job, and excludes
it from participating in any of the IO jobs.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/HOWTO b/HOWTO
index 7bd71a9..731684c 100644
--- a/HOWTO
+++ b/HOWTO
@@ -869,6 +869,18 @@
we only do about 0.4% of the gtod() calls we would have
done if all time keeping was enabled.
+gtod_cpu=int Sometimes it's cheaper to dedicate a single thread of
+ execution to just getting the current time. Fio (and
+ databases, for instance) are very intensive on gettimeofday()
+ calls. With this option, you can set one CPU aside for
+ doing nothing but logging current time to a shared memory
+ location. Then the other threads/processes that run IO
+ workloads need only copy that segment, instead of entering
+ the kernel with a gettimeofday() call. The CPU set aside
+ for doing these time calls will be excluded from other
+ uses. Fio will manually clear it from the CPU mask of other
+ jobs.
+
6.0 Interpreting the output
---------------------------