Skip to content

Commit

Permalink
perf: Don't schedule out/in pinned events on task tick
Browse files Browse the repository at this point in the history
We don't need to schedule in/out pinned events on task tick,
now that pinned and flexible groups can be scheduled separately.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>
  • Loading branch information
Frederic Weisbecker committed Jan 17, 2010
1 parent 5b0311e commit 7defb0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/perf_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1525,17 +1525,17 @@ void perf_event_task_tick(struct task_struct *curr)
if (ctx)
perf_ctx_adjust_freq(ctx);

cpu_ctx_sched_out(cpuctx, EVENT_ALL);
cpu_ctx_sched_out(cpuctx, EVENT_FLEXIBLE);
if (ctx)
task_ctx_sched_out(ctx, EVENT_ALL);
task_ctx_sched_out(ctx, EVENT_FLEXIBLE);

rotate_ctx(&cpuctx->ctx);
if (ctx)
rotate_ctx(ctx);

cpu_ctx_sched_in(cpuctx, EVENT_ALL);
cpu_ctx_sched_in(cpuctx, EVENT_FLEXIBLE);
if (ctx)
task_ctx_sched_in(curr, EVENT_ALL);
task_ctx_sched_in(curr, EVENT_FLEXIBLE);
}

static int event_enable_on_exec(struct perf_event *event,
Expand Down

0 comments on commit 7defb0f

Please sign in to comment.