[Lguest] [PATCH] Clocksource is continuous regardless of the state of the host's TSC.

Tony Breeds tony at bakeyournoodle.com
Thu Sep 27 17:21:16 EST 2007


Currently lguest will spend a lot of of time waking up the host, as it
cannot go tickless (if the [host] TSC has been marked unstable). On my
laptop I was getting ~40% of wakeups from lguest.

With this patch applied, my laptop is much happier!

Signed-off-by: Tony Breeds <tony at bakeyournoodle.com>

---

 drivers/lguest/lguest.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c
index ee1c6d0..16882b3 100644
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -773,11 +773,10 @@ static void lguest_time_init(void)
 	 * the TSC, otherwise it's a dumb nanosecond-resolution clock.  Either
 	 * way, the "rating" is initialized so high that it's always chosen
 	 * over any other clocksource. */
-	if (lguest_data.tsc_khz) {
+	if (lguest_data.tsc_khz)
 		lguest_clock.mult = clocksource_khz2mult(lguest_data.tsc_khz,
 							 lguest_clock.shift);
-		lguest_clock.flags = CLOCK_SOURCE_IS_CONTINUOUS;
-	}
+	lguest_clock.flags = CLOCK_SOURCE_IS_CONTINUOUS;
 	clock_base = lguest_clock_read();
 	clocksource_register(&lguest_clock);
 



More information about the Lguest mailing list