diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2012-09-08 14:14:02 (GMT) |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2012-09-25 13:42:37 (GMT) |
commit | a7e1a9e3af71b45ecae2dae35851f238117b317d (patch) | |
tree | 8b1d15d63779ba13d7884288c96a3510b7fde4b6 /include | |
parent | bf9fae9f5e4ca8dce4708812f9ad6281e61df109 (diff) | |
download | linux-fsl-qoriq-a7e1a9e3af71b45ecae2dae35851f238117b317d.tar.xz |
vtime: Consolidate system/idle context detection
Move the code that finds out to which context we account the
cputime into generic layer.
Archs that consider the whole time spent in the idle task as idle
time (ia64, powerpc) can rely on the generic vtime_account()
and implement vtime_account_system() and vtime_account_idle(),
letting the generic code to decide when to call which API.
Archs that have their own meaning of idle time, such as s390
that only considers the time spent in CPU low power mode as idle
time, can just override vtime_account().
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/kernel_stat.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kernel_stat.h b/include/linux/kernel_stat.h index ca0944b..36d12f0 100644 --- a/include/linux/kernel_stat.h +++ b/include/linux/kernel_stat.h @@ -132,6 +132,8 @@ extern void account_idle_ticks(unsigned long ticks); #ifdef CONFIG_VIRT_CPU_ACCOUNTING extern void vtime_task_switch(struct task_struct *prev); +extern void vtime_account_system(struct task_struct *tsk); +extern void vtime_account_idle(struct task_struct *tsk); #else static inline void vtime_task_switch(struct task_struct *prev) { } #endif |