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>
Showing
- arch/i386/kernel/paravirt.c 1 addition, 1 deletionarch/i386/kernel/paravirt.c
- arch/i386/kernel/tsc.c 15 additions, 8 deletionsarch/i386/kernel/tsc.c
- arch/i386/kernel/vmi.c 1 addition, 1 deletionarch/i386/kernel/vmi.c
- arch/i386/kernel/vmiclock.c 3 additions, 3 deletionsarch/i386/kernel/vmiclock.c
- include/asm-i386/paravirt.h 5 additions, 2 deletionsinclude/asm-i386/paravirt.h
- include/asm-i386/timer.h 31 additions, 1 deletioninclude/asm-i386/timer.h
- include/asm-i386/vmi_time.h 1 addition, 1 deletioninclude/asm-i386/vmi_time.h
Loading
Please register or sign in to comment