提交 fe432200 编写于 作者: P Peter Zijlstra 提交者: Ingo Molnar

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: NPaul Mackerras <paulus@samba.org>
Signed-off-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1263374859.4244.192.camel@laptop>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
上级 b00eca8c
...@@ -1198,6 +1198,7 @@ void update_process_times(int user_tick) ...@@ -1198,6 +1198,7 @@ void update_process_times(int user_tick)
run_local_timers(); run_local_timers();
rcu_check_callbacks(cpu, user_tick); rcu_check_callbacks(cpu, user_tick);
printk_tick(); printk_tick();
perf_event_do_pending();
scheduler_tick(); scheduler_tick();
run_posix_cpu_timers(p); run_posix_cpu_timers(p);
} }
...@@ -1209,8 +1210,6 @@ static void run_timer_softirq(struct softirq_action *h) ...@@ -1209,8 +1210,6 @@ static void run_timer_softirq(struct softirq_action *h)
{ {
struct tvec_base *base = __get_cpu_var(tvec_bases); struct tvec_base *base = __get_cpu_var(tvec_bases);
perf_event_do_pending();
hrtimer_run_pending(); hrtimer_run_pending();
if (time_after_eq(jiffies, base->timer_jiffies)) if (time_after_eq(jiffies, base->timer_jiffies))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册