Skip to content

Commit

Permalink
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Revert 738d2be, simplify set_task_cpu()
  • Loading branch information
Linus Torvalds committed Dec 23, 2009
2 parents 94e5165 + 0c69774 commit 6432ed6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -2045,11 +2045,10 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)

trace_sched_migrate_task(p, new_cpu);

if (task_cpu(p) == new_cpu)
return;

p->se.nr_migrations++;
perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, 1, NULL, 0);
if (task_cpu(p) != new_cpu) {
p->se.nr_migrations++;
perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, 1, NULL, 0);
}

__set_task_cpu(p, new_cpu);
}
Expand Down

0 comments on commit 6432ed6

Please sign in to comment.