aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel
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/ia64/kernel
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/ia64/kernel')
-rw-r--r--arch/ia64/kernel/time.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c
index f6388216080d..834c78bd3b5f 100644
--- a/arch/ia64/kernel/time.c
+++ b/arch/ia64/kernel/time.c
@@ -83,7 +83,7 @@ static struct clocksource *itc_clocksource;
83 83
84extern cputime_t cycle_to_cputime(u64 cyc); 84extern cputime_t cycle_to_cputime(u64 cyc);
85 85
86static void vtime_account_user(struct task_struct *tsk) 86void vtime_account_user(struct task_struct *tsk)
87{ 87{
88 cputime_t delta_utime; 88 cputime_t delta_utime;
89 struct thread_info *ti = task_thread_info(tsk); 89 struct thread_info *ti = task_thread_info(tsk);
@@ -147,15 +147,6 @@ void vtime_account_idle(struct task_struct *tsk)
147 account_idle_time(vtime_delta(tsk)); 147 account_idle_time(vtime_delta(tsk));
148} 148}
149 149
150/*
151 * Called from the timer interrupt handler to charge accumulated user time
152 * to the current process. Must be called with interrupts disabled.
153 */
154void account_process_tick(struct task_struct *p, int user_tick)
155{
156 vtime_account_user(p);
157}
158
159#endif /* CONFIG_VIRT_CPU_ACCOUNTING */ 150#endif /* CONFIG_VIRT_CPU_ACCOUNTING */
160 151
161static irqreturn_t 152static irqreturn_t