]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
Add a sched_clock paravirt_op
authorJeremy Fitzhardinge <jeremy@xensource.com>
Wed, 18 Jul 2007 01:37:04 +0000 (18:37 -0700)
committerJeremy Fitzhardinge <jeremy@goop.org>
Wed, 18 Jul 2007 15:47:42 +0000 (08:47 -0700)
commit688340ea34c61ad12473ccd837325b59aada9a93
tree2862f4dca8d47fc4e6ecfaba2243d813344e3cd2
parentd572929cdd12a60732c3522f7cf011bfa29165cf
Add a sched_clock paravirt_op

The tsc-based get_scheduled_cycles interface is not a good match for
Xen's runstate accounting, which reports everything in nanoseconds.

This patch replaces this interface with a sched_clock interface, which
matches both Xen and VMI's requirements.

In order to do this, we:
   1. replace get_scheduled_cycles with sched_clock
   2. hoist cycles_2_ns into a common header
   3. update vmi accordingly

One thing to note: because sched_clock is implemented as a weak
function in kernel/sched.c, we must define a real function in order to
override this weak binding.  This means the usual paravirt_ops
technique of using an inline function won't work in this case.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Zachary Amsden <zach@vmware.com>
Cc: Dan Hecht <dhecht@vmware.com>
Cc: john stultz <johnstul@us.ibm.com>
arch/i386/kernel/paravirt.c
arch/i386/kernel/tsc.c
arch/i386/kernel/vmi.c
arch/i386/kernel/vmiclock.c
include/asm-i386/paravirt.h
include/asm-i386/timer.h
include/asm-i386/vmi_time.h