aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2009-12-27 05:51:52 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-28 03:21:33 -0500
commit49f474331e563a6ecf3b1e87ec27ec5482b3e4f1 (patch)
treee3e4b5c718fd3d35ce01d4fe015886d9f3336760 /kernel/sched.c
parent4cf40131a5cf4918e83b3756e58a1fc9e984f8ef (diff)
perf events: Remove arg from perf sched hooks
Since we only ever schedule the local cpu, there is no need to pass the cpu number to the perf sched hooks. This micro-optimizes things a bit. Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index 18cceeecce35..d6527ac0f6e7 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2752,7 +2752,7 @@ static void finish_task_switch(struct rq *rq, struct task_struct *prev)
2752 */ 2752 */
2753 prev_state = prev->state; 2753 prev_state = prev->state;
2754 finish_arch_switch(prev); 2754 finish_arch_switch(prev);
2755 perf_event_task_sched_in(current, cpu_of(rq)); 2755 perf_event_task_sched_in(current);
2756 finish_lock_switch(rq, prev); 2756 finish_lock_switch(rq, prev);
2757 2757
2758 fire_sched_in_preempt_notifiers(current); 2758 fire_sched_in_preempt_notifiers(current);
@@ -5266,7 +5266,7 @@ void scheduler_tick(void)
5266 curr->sched_class->task_tick(rq, curr, 0); 5266 curr->sched_class->task_tick(rq, curr, 0);
5267 raw_spin_unlock(&rq->lock); 5267 raw_spin_unlock(&rq->lock);
5268 5268
5269 perf_event_task_tick(curr, cpu); 5269 perf_event_task_tick(curr);
5270 5270
5271#ifdef CONFIG_SMP 5271#ifdef CONFIG_SMP
5272 rq->idle_at_tick = idle_cpu(cpu); 5272 rq->idle_at_tick = idle_cpu(cpu);
@@ -5480,7 +5480,7 @@ need_resched_nonpreemptible:
5480 5480
5481 if (likely(prev != next)) { 5481 if (likely(prev != next)) {
5482 sched_info_switch(prev, next); 5482 sched_info_switch(prev, next);
5483 perf_event_task_sched_out(prev, next, cpu); 5483 perf_event_task_sched_out(prev, next);
5484 5484
5485 rq->nr_switches++; 5485 rq->nr_switches++;
5486 rq->curr = next; 5486 rq->curr = next;