aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched/core.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 725aa067ad63..5ac63c9a995a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -978,13 +978,6 @@ void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
978 rq->skip_clock_update = 1; 978 rq->skip_clock_update = 1;
979} 979}
980 980
981static ATOMIC_NOTIFIER_HEAD(task_migration_notifier);
982
983void register_task_migration_notifier(struct notifier_block *n)
984{
985 atomic_notifier_chain_register(&task_migration_notifier, n);
986}
987
988#ifdef CONFIG_SMP 981#ifdef CONFIG_SMP
989void set_task_cpu(struct task_struct *p, unsigned int new_cpu) 982void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
990{ 983{
@@ -1015,18 +1008,10 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
1015 trace_sched_migrate_task(p, new_cpu); 1008 trace_sched_migrate_task(p, new_cpu);
1016 1009
1017 if (task_cpu(p) != new_cpu) { 1010 if (task_cpu(p) != new_cpu) {
1018 struct task_migration_notifier tmn;
1019
1020 if (p->sched_class->migrate_task_rq) 1011 if (p->sched_class->migrate_task_rq)
1021 p->sched_class->migrate_task_rq(p, new_cpu); 1012 p->sched_class->migrate_task_rq(p, new_cpu);
1022 p->se.nr_migrations++; 1013 p->se.nr_migrations++;
1023 perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, NULL, 0); 1014 perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, NULL, 0);
1024
1025 tmn.task = p;
1026 tmn.from_cpu = task_cpu(p);
1027 tmn.to_cpu = new_cpu;
1028
1029 atomic_notifier_call_chain(&task_migration_notifier, 0, &tmn);
1030 } 1015 }
1031 1016
1032 __set_task_cpu(p, new_cpu); 1017 __set_task_cpu(p, new_cpu);