diff options
author | Tony Breeds <tony@bakeyournoodle.com> | 2007-10-22 10:56:25 +1000 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2007-10-23 15:49:49 +1000 |
commit | 05aa026a62d0fe0b4664a01d1537984b12567e7c (patch) | |
tree | 76fad2d7d091ca2532237ba4a5ddc877348e2a91 /drivers/lguest/lguest.c | |
parent | ebac52524df31e7c2fe13ca5bd3438907842f763 (diff) | |
download | linux-05aa026a62d0fe0b4664a01d1537984b12567e7c.tar.gz linux-05aa026a62d0fe0b4664a01d1537984b12567e7c.tar.bz2 linux-05aa026a62d0fe0b4664a01d1537984b12567e7c.zip |
Clocksource is continuous regardless of the state of the host's TSC.
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@bakeyournoodle.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/lguest/lguest.c')
-rw-r--r-- | 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 c9ca610f4996..8e9e485a5cfa 100644 --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c @@ -679,6 +679,7 @@ static struct clocksource lguest_clock = { .mask = CLOCKSOURCE_MASK(64), .mult = 1 << 22, .shift = 22, + .flags = CLOCK_SOURCE_IS_CONTINUOUS, }; /* The "scheduler clock" is just our real clock, adjusted to start at zero */ @@ -760,11 +761,9 @@ 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; - } clock_base = lguest_clock_read(); clocksource_register(&lguest_clock); |