aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2010-01-18 03:08:26 -0500
committerIngo Molnar <mingo@elte.hu>2010-01-21 07:40:39 -0500
commitfe432200abb0d64f409895168d9ad8fbb9d8e6c6 (patch)
treedab76fc8e717241e1e035f3856d22af5582c1c9c /kernel
parentb00eca8cd66029128615e8be9a19e284a950c0f2 (diff)
perf: Fix perf_event_do_pending() fallback callsite
Paul questioned the context in which we should call perf_event_do_pending(). After looking at that I found that it should be called from IRQ context these days, however the fallback call-site is placed in softirq context. Ammend this by placing the callback in the IRQ timer path. Reported-by: Paul Mackerras <paulus@samba.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <1263374859.4244.192.camel@laptop> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/timer.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index 15533b792397..c61a7949387f 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1198,6 +1198,7 @@ void update_process_times(int user_tick)
1198 run_local_timers(); 1198 run_local_timers();
1199 rcu_check_callbacks(cpu, user_tick); 1199 rcu_check_callbacks(cpu, user_tick);
1200 printk_tick(); 1200 printk_tick();
1201 perf_event_do_pending();
1201 scheduler_tick(); 1202 scheduler_tick();
1202 run_posix_cpu_timers(p); 1203 run_posix_cpu_timers(p);
1203} 1204}
@@ -1209,8 +1210,6 @@ static void run_timer_softirq(struct softirq_action *h)
1209{ 1210{
1210 struct tvec_base *base = __get_cpu_var(tvec_bases); 1211 struct tvec_base *base = __get_cpu_var(tvec_bases);
1211 1212
1212 perf_event_do_pending();
1213
1214 hrtimer_run_pending(); 1213 hrtimer_run_pending();
1215 1214
1216 if (time_after_eq(jiffies, base->timer_jiffies)) 1215 if (time_after_eq(jiffies, base->timer_jiffies))