Skip to content

Commit

Permalink
perf: Fix perf_event_do_pending() fallback callsite
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 21, 2010
1 parent b00eca8 commit fe43220
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ void update_process_times(int user_tick)
run_local_timers();
rcu_check_callbacks(cpu, user_tick);
printk_tick();
perf_event_do_pending();
scheduler_tick();
run_posix_cpu_timers(p);
}
Expand All @@ -1209,8 +1210,6 @@ static void run_timer_softirq(struct softirq_action *h)
{
struct tvec_base *base = __get_cpu_var(tvec_bases);

perf_event_do_pending();

hrtimer_run_pending();

if (time_after_eq(jiffies, base->timer_jiffies))
Expand Down

0 comments on commit fe43220

Please sign in to comment.