kernel-ark/arch/x86/xen
Martin Schwidefsky 79741dd357 [PATCH] idle cputime accounting
The cpu time spent by the idle process actually doing something is
currently accounted as idle time. This is plain wrong, the architectures
that support VIRT_CPU_ACCOUNTING=y can do better: distinguish between the
time spent doing nothing and the time spent by idle doing work. The first
is accounted with account_idle_time and the second with account_system_time.
The architectures that use the account_xxx_time interface directly and not
the account_xxx_ticks interface now need to do the check for the idle
process in their arch code. In particular to improve the system vs true
idle time accounting the arch code needs to measure the true idle time
instead of just testing for the idle process.
To improve the tick based accounting as well we would need an architecture
primitive that can tell us if the pt_regs of the interrupted context
points to the magic instruction that halts the cpu.

In addition idle time is no more added to the stime of the idle process.
This field now contains the system time of the idle process as it should
be. On systems without VIRT_CPU_ACCOUNTING this will always be zero as
every tick that occurs while idle is running will be accounted as idle
time.

This patch contains the necessary common code changes to be able to
distinguish idle system time and true idle time. The architectures with
support for VIRT_CPU_ACCOUNTING need some changes to exploit this.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2008-12-31 15:11:46 +01:00
..
debugfs.c xen: add debugfs support 2008-08-21 13:52:58 +02:00
debugfs.h xen: add debugfs support 2008-08-21 13:52:58 +02:00
enlighten.c xen: clean up asm/xen/hypervisor.h 2008-12-16 21:50:31 +01:00
grant-table.c
irq.c xen: Fix bug `do_IRQ: cannot handle IRQ -1 vector 0x6 cpu 1' 2008-10-16 16:52:58 +02:00
Kconfig xen: make CONFIG_XEN_SAVE_RESTORE depend on CONFIG_XEN 2008-09-30 09:58:05 +02:00
Makefile ftrace: rename FTRACE to FUNCTION_TRACER 2008-10-20 18:27:03 +02:00
mmu.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
mmu.h xen: use spin_lock_nest_lock when pinning a pagetable 2008-10-09 14:25:19 +02:00
multicalls.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
multicalls.h xen: add mechanism to extend existing multicalls 2008-06-25 15:17:34 +02:00
setup.c xen: whitespace/checkpatch cleanup 2008-12-16 21:05:01 +01:00
smp.c xen_play_dead() is __cpuinit 2008-11-30 10:03:38 -08:00
spinlock.c genirq: revert dynarray 2008-10-16 16:53:15 +02:00
suspend.c xen: add xen_arch_resume()/xen_timer_resume hook for ia64 support 2008-07-16 10:55:50 +02:00
time.c [PATCH] idle cputime accounting 2008-12-31 15:11:46 +01:00
vdso.h
xen-asm_32.S xen: compile irq functions without -pg for ftrace 2008-07-31 12:39:39 +02:00
xen-asm_64.S xen: clean up x86-64 warnings 2008-10-03 10:04:10 +02:00
xen-head.S xen64: add xen-head code to head_64.S 2008-07-16 10:58:41 +02:00
xen-ops.h xen_setup_vcpu_info_placement() is not init on x86 2008-11-30 10:03:37 -08:00