aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/vtime.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/s390/kernel/vtime.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/s390/kernel/vtime.c')
-rw-r--r--arch/s390/kernel/vtime.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c
index 80d1dbc5d42e..7c6d861a1a40 100644
--- a/arch/s390/kernel/vtime.c
+++ b/arch/s390/kernel/vtime.c
@@ -112,7 +112,12 @@ void vtime_task_switch(struct task_struct *prev)
112 S390_lowcore.system_timer = ti->system_timer; 112 S390_lowcore.system_timer = ti->system_timer;
113} 113}
114 114
115void account_process_tick(struct task_struct *tsk, int user_tick) 115/*
116 * In s390, accounting pending user time also implies
117 * accounting system time in order to correctly compute
118 * the stolen time accounting.
119 */
120void vtime_account_user(struct task_struct *tsk)
116{ 121{
117 if (do_account_vtime(tsk, HARDIRQ_OFFSET)) 122 if (do_account_vtime(tsk, HARDIRQ_OFFSET))
118 virt_timer_expire(); 123 virt_timer_expire();