Recent changes (master)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The following changes since commit 84b3842c7373268d62d2be26c3af28707f91c98c:

  binject: fixup ->file_data breakage (2012-12-12 09:07:00 +0100)

are available in the git repository at:
  git://git.kernel.dk/fio.git master

Jens Axboe (1):
      clock: ensure that we re-init if the clocksource changes from the default

 gettime.c |    5 +++++
 gettime.h |    1 +
 options.c |    1 +
 3 files changed, 7 insertions(+), 0 deletions(-)

---

Diff of recent changes:

diff --git a/gettime.c b/gettime.c
index 1ba18e9..9f23e3f 100644
--- a/gettime.c
+++ b/gettime.c
@@ -22,6 +22,7 @@ static int last_tv_valid;
 
 enum fio_cs fio_clock_source = FIO_PREFERRED_CLOCK_SOURCE;
 int fio_clock_source_set = 0;
+enum fio_cs fio_clock_source_inited = CS_INVAL;
 
 #ifdef FIO_DEBUG_TIME
 
@@ -262,7 +263,11 @@ static void calibrate_cpu_clock(void)
 
 void fio_clock_init(void)
 {
+	if (fio_clock_source == fio_clock_source_inited)
+		return;
+
 	last_tv_valid = 0;
+	fio_clock_source_inited = fio_clock_source;
 	calibrate_cpu_clock();
 
 	/*
diff --git a/gettime.h b/gettime.h
index 309ef21..64651a1 100644
--- a/gettime.h
+++ b/gettime.h
@@ -8,6 +8,7 @@ enum fio_cs {
 	CS_GTOD		= 1,
 	CS_CGETTIME,
 	CS_CPUCLOCK,
+	CS_INVAL,
 };
 
 extern void fio_gettime(struct timeval *, void *);
diff --git a/options.c b/options.c
index 738c78b..ae290ed 100644
--- a/options.c
+++ b/options.c
@@ -371,6 +371,7 @@ static int fio_clock_source_cb(void *data, const char *str)
 
 	fio_clock_source = td->o.clocksource;
 	fio_clock_source_set = 1;
+	fio_clock_init();
 	return 0;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux