]> git.baikalelectronics.ru Git - kernel.git/commit
cputime: Allow dynamic switch between tick/virtual based cputime accounting
authorFrederic Weisbecker <fweisbec@gmail.com>
Mon, 16 Jul 2012 16:00:34 +0000 (18:00 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Sun, 27 Jan 2013 18:23:29 +0000 (19:23 +0100)
commit9bc1552080228640f5b56030a686400607626fbf
treeaaa1792d0b78ea33c07ee6f5e707a07d9ef1795e
parent3be8e7f5fd80b8afc98ce4789319a2dc9988b47b
cputime: Allow dynamic switch between tick/virtual based cputime accounting

Allow to dynamically switch between tick and virtual based
cputime accounting. This way we can provide a kind of "on-demand"
virtual based cputime accounting. In this mode, the kernel relies
on the context tracking subsystem to dynamically probe on kernel
boundaries.

This is in preparation for being able to stop the timer tick in
more places than just the idle state. Doing so will depend on
CONFIG_VIRT_CPU_ACCOUNTING_GEN which makes it possible to account
the cputime without the tick by hooking on kernel/user boundaries.

Depending whether the tick is stopped or not, we can switch between
tick and vtime based accounting anytime in order to minimize the
overhead associated to user hooks.

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>
include/linux/vtime.h
kernel/sched/cputime.c
kernel/time/tick-sched.c