summaryrefslogtreecommitdiffstats
path: root/kernel/sched
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2013-07-10 22:21:57 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2013-07-18 12:29:30 +0200
commite04c5d76b0cfb66cadd900cf147526f2271884b8 (patch)
treea303b66c1fc1ae7786148d2f50e8b0b86290162b /kernel/sched
parentb3897a49e22fc173efa77527a447c714f753f681 (diff)
downloadblackbird-op-linux-e04c5d76b0cfb66cadd900cf147526f2271884b8.tar.gz
blackbird-op-linux-e04c5d76b0cfb66cadd900cf147526f2271884b8.zip
remove sched notifier for cross-cpu migrations
Linux as a guest on KVM hypervisor, the only user of the pvclock vsyscall interface, does not require notification on task migration because: 1. cpu ID number maps 1:1 to per-CPU pvclock time info. 2. per-CPU pvclock time info is updated if the underlying CPU changes. 3. that version is increased whenever underlying CPU changes. Which is sufficient to guarantee nanoseconds counter is calculated properly. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Acked-by: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'kernel/sched')
-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 0d8eb4525e76..0efd2eefb027 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -976,13 +976,6 @@ void check_preempt_curr(struct rq *rq, struct task_struct *p, int flags)
rq->skip_clock_update = 1;
}
-static ATOMIC_NOTIFIER_HEAD(task_migration_notifier);
-
-void register_task_migration_notifier(struct notifier_block *n)
-{
- atomic_notifier_chain_register(&task_migration_notifier, n);
-}
-
#ifdef CONFIG_SMP
void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
{
@@ -1013,18 +1006,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) {
- struct task_migration_notifier tmn;
-
if (p->sched_class->migrate_task_rq)
p->sched_class->migrate_task_rq(p, new_cpu);
p->se.nr_migrations++;
perf_sw_event(PERF_COUNT_SW_CPU_MIGRATIONS, 1, NULL, 0);
-
- tmn.task = p;
- tmn.from_cpu = task_cpu(p);
- tmn.to_cpu = new_cpu;
-
- atomic_notifier_call_chain(&task_migration_notifier, 0, &tmn);
}
__set_task_cpu(p, new_cpu);
OpenPOWER on IntegriCloud