]> git.baikalelectronics.ru Git - kernel.git/commit
Provide timespec to guests rather than jiffies clock.
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 27 Jul 2007 03:42:52 +0000 (13:42 +1000)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 29 Jul 2007 02:54:33 +0000 (19:54 -0700)
commitb868eda41f7af28091c36bdf4863648df7ea5bd5
tree60cc83cf949d6e598e6dc80dc668aebd42c65540
parent056d16e98aea7fe6162da3402aa11ce624b1c9e8
Provide timespec to guests rather than jiffies clock.

A non-periodic clock_event_device and the "jiffies" clock don't mix well:
tick_handle_periodic() can go into an infinite loop.

Currently lguest guests use the jiffies clock when the TSC is
unusable.  Instead, make the Host write the current time into the lguest
page on every interrupt.  This doesn't cost much but is more precise
and at least as accurate as the jiffies clock.  It also gets rid of
the GET_WALLCLOCK hypercall.

Also, delay setting sched_clock until our clock is set up, otherwise
the early printk timestamps can go backwards (not harmful, just ugly).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/lguest/hypercalls.c
drivers/lguest/interrupts_and_traps.c
drivers/lguest/lg.h
drivers/lguest/lguest.c
include/linux/lguest.h