Add --cpuclock-test and clocksource= option help
authorJens Axboe <axboe@kernel.dk>
Mon, 17 Dec 2012 13:44:08 +0000 (14:44 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Dec 2012 13:44:08 +0000 (14:44 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
HOWTO
README
fio.1
init.c

diff --git a/HOWTO b/HOWTO
index b349620107f2dc9935ad07b5cdfda6e0dffc2f73..0930f33784a6515fe67691226851c38621bb47b2 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -1262,6 +1262,22 @@ percentile_list=float_list Overwrite the default list of percentiles
                the values of completion latency below which 99.5% and
                99.9% of the observed latencies fell, respectively.
 
                the values of completion latency below which 99.5% and
                99.9% of the observed latencies fell, respectively.
 
+clocksource=str        Use the given clocksource as the base of timing. The
+               supported options are:
+
+                       gettimeofday    gettimeofday(2)
+
+                       clock_gettime   clock_gettime(2)
+
+                       cpu             Internal CPU clock source
+
+               cpu is the preferred clocksource if it is reliable, as it
+               is very fast (and fio is heavy on time calls). Fio will
+               automatically use this clocksource if it's supported and
+               considered reliable on the system it is running on, unless
+               another clocksource is specifically set. For x86/x86-64 CPUs,
+               this means supporting TSC Invariant.
+
 gtod_reduce=bool Enable all of the gettimeofday() reducing options
                (disable_clat, disable_slat, disable_bw) plus reduce
                precision of the timeout somewhat to really shrink
 gtod_reduce=bool Enable all of the gettimeofday() reducing options
                (disable_clat, disable_slat, disable_bw) plus reduce
                precision of the timeout somewhat to really shrink
diff --git a/README b/README
index ceac3857a191d42579abe7b338ec65c8c5ca7276..7c4552d98bad1692abaea0d2ab8a726d369cbbb5 100644 (file)
--- a/README
+++ b/README
@@ -129,6 +129,7 @@ $ fio
        --terse-version=type    Terse version output format (default 3, or 2 or 4).
        --version               Print version info and exit
        --help                  Print this page
        --terse-version=type    Terse version output format (default 3, or 2 or 4).
        --version               Print version info and exit
        --help                  Print this page
+       --cpuclock-test         Perform test/validation of CPU clock
        --cmdhelp=cmd           Print command help, "all" for all of them
        --enghelp=engine        Print ioengine help, or list available ioengines
        --enghelp=engine,cmd    Print help for an ioengine cmd
        --cmdhelp=cmd           Print command help, "all" for all of them
        --enghelp=engine        Print ioengine help, or list available ioengines
        --enghelp=engine,cmd    Print help for an ioengine cmd
diff --git a/fio.1 b/fio.1
index b7abc4b6f97f639e024b470b721598084ed2447b..22c32fd0f59c1deeba9b96bd3f563064485c7b52 100644 (file)
--- a/fio.1
+++ b/fio.1
@@ -1027,6 +1027,27 @@ given time in milliseconds.
 .BI disk_util \fR=\fPbool
 Generate disk utilization statistics if the platform supports it. Default: true.
 .TP
 .BI disk_util \fR=\fPbool
 Generate disk utilization statistics if the platform supports it. Default: true.
 .TP
+.BI clocksource \fR=\fPstr
+Use the given clocksource as the base of timing. The supported options are:
+.RS
+.TP
+.B gettimeofday
+gettimeofday(2)
+.TP
+.B clock_gettime
+clock_gettime(2)
+.TP
+.B cpu
+Internal CPU clock source
+.TP
+.RE
+.P
+\fBcpu\fR is the preferred clocksource if it is reliable, as it is very fast
+(and fio is heavy on time calls). Fio will automatically use this clocksource
+if it's supported and considered reliable on the system it is running on,
+unless another clocksource is specifically set. For x86/x86-64 CPUs, this
+means supporting TSC Invariant.
+.TP
 .BI gtod_reduce \fR=\fPbool
 Enable all of the gettimeofday() reducing options (disable_clat, disable_slat,
 disable_bw) plus reduce precision of the timeout somewhat to really shrink the
 .BI gtod_reduce \fR=\fPbool
 Enable all of the gettimeofday() reducing options (disable_clat, disable_slat,
 disable_bw) plus reduce precision of the timeout somewhat to really shrink the
diff --git a/init.c b/init.c
index c894af3a734988ec80a55a056be193434122ac1c..e7b3303e6179673703697e71063a9f63d29badcc 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1260,6 +1260,7 @@ static void usage(const char *name)
        printf("  --terse-version=x\tSet terse version output format to 'x'\n");
        printf("  --version\t\tPrint version info and exit\n");
        printf("  --help\t\tPrint this page\n");
        printf("  --terse-version=x\tSet terse version output format to 'x'\n");
        printf("  --version\t\tPrint version info and exit\n");
        printf("  --help\t\tPrint this page\n");
+       printf("  --cpuclock-test\tPerform test/validation of CPU clock\n");
        printf("  --cmdhelp=cmd\t\tPrint command help, \"all\" for all of"
                " them\n");
        printf("  --enghelp=engine\tPrint ioengine help, or list"
        printf("  --cmdhelp=cmd\t\tPrint command help, \"all\" for all of"
                " them\n");
        printf("  --enghelp=engine\tPrint ioengine help, or list"
@@ -1280,7 +1281,7 @@ static void usage(const char *name)
        printf("  --daemonize=pidfile\tBackground fio server, write pid to file\n");
        printf("  --client=hostname\tTalk to remote backend fio server at hostname\n");
        printf("\nFio was written by Jens Axboe <jens.axboe@oracle.com>");
        printf("  --daemonize=pidfile\tBackground fio server, write pid to file\n");
        printf("  --client=hostname\tTalk to remote backend fio server at hostname\n");
        printf("\nFio was written by Jens Axboe <jens.axboe@oracle.com>");
-       printf("\n                 Jens Axboe <jaxboe@fusionio.com>\n");
+       printf("\n                   Jens Axboe <jaxboe@fusionio.com>\n");
 }
 
 #ifdef FIO_INC_DEBUG
 }
 
 #ifdef FIO_INC_DEBUG