aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/time.c
diff options
context:
space:
mode:
authorFrederic Weisbecker <fweisbec@gmail.com>2012-11-13 17:51:06 -0500
committerFrederic Weisbecker <fweisbec@gmail.com>2012-11-19 10:41:21 -0500
commitbcebdf846522056a84ba0b0cba5f5413868c9394 (patch)
tree76e007a63351abe84a9713e3b182463c230d1053 /arch/powerpc/kernel/time.c
parentfd25b4c2f226de818e1d2b71e3e681d28bcaf5ba (diff)
vtime: Explicitly account pending user time on process tick
All vtime implementations just flush the user time on process tick. Consolidate that in generic code by calling a user time accounting helper. This avoids an indirect call in ia64 and prepare to also consolidate vtime context switch code. Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com> Reviewed-by: Steven Rostedt <rostedt@goodmis.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@kernel.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Paul Gortmaker <paul.gortmaker@windriver.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>
Diffstat (limited to 'arch/powerpc/kernel/time.c')
-rw-r--r--arch/powerpc/kernel/time.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
index ce4cb772dc78..a667aaf85846 100644
--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -355,15 +355,15 @@ void vtime_account_idle(struct task_struct *tsk)
355} 355}
356 356
357/* 357/*
358 * Transfer the user and system times accumulated in the paca 358 * Transfer the user time accumulated in the paca
359 * by the exception entry and exit code to the generic process 359 * by the exception entry and exit code to the generic
360 * user and system time records. 360 * process user time records.
361 * Must be called with interrupts disabled. 361 * Must be called with interrupts disabled.
362 * Assumes that vtime_account() has been called recently 362 * Assumes that vtime_account_system/idle() has been called
363 * (i.e. since the last entry from usermode) so that 363 * recently (i.e. since the last entry from usermode) so that
364 * get_paca()->user_time_scaled is up to date. 364 * get_paca()->user_time_scaled is up to date.
365 */ 365 */
366void account_process_tick(struct task_struct *tsk, int user_tick) 366void vtime_account_user(struct task_struct *tsk)
367{ 367{
368 cputime_t utime, utimescaled; 368 cputime_t utime, utimescaled;
369 369
@@ -378,7 +378,7 @@ void account_process_tick(struct task_struct *tsk, int user_tick)
378void vtime_task_switch(struct task_struct *prev) 378void vtime_task_switch(struct task_struct *prev)
379{ 379{
380 vtime_account(prev); 380 vtime_account(prev);
381 account_process_tick(prev, 0); 381 vtime_account_user(prev);
382} 382}
383 383
384#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */ 384#else /* ! CONFIG_VIRT_CPU_ACCOUNTING */