linux/arch
Frederic Weisbecker abf917cd91 cputime: Generic on-demand virtual cputime accounting
If we want to stop the tick further idle, we need to be
able to account the cputime without using the tick.

Virtual based cputime accounting solves that problem by
hooking into kernel/user boundaries.

However implementing CONFIG_VIRT_CPU_ACCOUNTING require
low level hooks and involves more overhead. But we already
have a generic context tracking subsystem that is required
for RCU needs by archs which plan to shut down the tick
outside idle.

This patch implements a generic virtual based cputime
accounting that relies on these generic kernel/user hooks.

There are some upsides of doing this:

- This requires no arch code to implement CONFIG_VIRT_CPU_ACCOUNTING
if context tracking is already built (already necessary for RCU in full
tickless mode).

- We can rely on the generic context tracking subsystem to dynamically
(de)activate the hooks, so that we can switch anytime between virtual
and tick based accounting. This way we don't have the overhead
of the virtual accounting when the tick is running periodically.

And one downside:

- There is probably more overhead than a native virtual based cputime
accounting. But this relies on hooks that are already set anyway.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
2013-01-27 19:23:27 +01:00
..
alpha ALPHA: drivers: remove __dev* attributes. 2013-01-03 15:57:13 -08:00
arm Sound fixes #2 for 3.8-rc4 2013-01-16 11:33:52 -08:00
arm64 - Page protection fixes, including proper PAGE_NONE handling 2013-01-16 09:44:40 -08:00
avr32 ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
blackfin ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
c6x These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
cris ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
frv ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
h8300 These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
hexagon Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
ia64 cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +01:00
m32r ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
m68k ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
microblaze Merge branch 'next' of git://git.monstr.eu/linux-2.6-microblaze 2013-01-07 07:39:32 -08:00
mips Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-01-07 07:50:41 -08:00
mn10300 arch/mn10300/Kconfig: select CONFIG_GENERIC_ATOMIC64 2013-01-11 14:54:55 -08:00
openrisc ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
parisc ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
powerpc cputime: Generic on-demand virtual cputime accounting 2013-01-27 19:23:27 +01:00
s390 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2013-01-17 08:56:30 -08:00
score ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
sh sh: ecovec: add sample amixer settings 2013-01-16 18:30:44 +09:00
sparc sparc: remove __devinit, __devexit annotations 2013-01-12 15:28:45 -08:00
tile ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
um Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00
unicore32 ARCH: drivers remove __dev* attributes. 2013-01-03 15:57:13 -08:00
x86 Merge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-01-16 09:11:50 -08:00
xtensa These are a few cleanups for asm-generic: 2012-12-21 16:39:08 -08:00
.gitignore
Kconfig Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/signal 2012-12-20 18:05:28 -08:00