Add gtod_reduce option

This cuts down even more on gtod() calls. While the three disable_X
options halved the gettimeofday() call count, this can reduce it to
less than 1 percent of what it otherwise would have been.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/options.c b/options.c
index d4fc184..f068ebd 100644
--- a/options.c
+++ b/options.c
@@ -432,6 +432,20 @@
 	return 0;
 }
 
+static int str_gtod_reduce_cb(void *data, int *il)
+{
+	struct thread_data *td = data;
+	int val = *il;
+
+	td->o.disable_clat = !!val;
+	td->o.disable_slat = !!val;
+	td->o.disable_bw = !!val;
+	if (val)
+		td->tv_cache_mask = 63;
+
+	return 0;
+}
+
 #define __stringify_1(x)	#x
 #define __stringify(x)		__stringify_1(x)
 
@@ -1291,10 +1305,18 @@
 	},
 #endif
 	{
+		.name	= "gtod_reduce",
+		.type	= FIO_OPT_BOOL,
+		.help	= "Greatly reduce number of gettimeofday() calls",
+		.cb	= str_gtod_reduce_cb,
+		.def	= "0",
+	},
+	{
 		.name	= "disable_clat",
 		.type	= FIO_OPT_BOOL,
 		.off1	= td_var_offset(disable_clat),
 		.help	= "Disable completion latency numbers",
+		.parent	= "gtod_reduce",
 		.def	= "0",
 	},
 	{
@@ -1302,6 +1324,7 @@
 		.type	= FIO_OPT_BOOL,
 		.off1	= td_var_offset(disable_slat),
 		.help	= "Disable submissionn latency numbers",
+		.parent	= "gtod_reduce",
 		.def	= "0",
 	},
 	{
@@ -1309,6 +1332,7 @@
 		.type	= FIO_OPT_BOOL,
 		.off1	= td_var_offset(disable_bw),
 		.help	= "Disable bandwidth logging",
+		.parent	= "gtod_reduce",
 		.def	= "0",
 	},
 	{