summaryrefslogtreecommitdiffstats
path: root/kernel/sched/core.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2016-10-05 17:59:32 +0200
committerIngo Molnar <mingo@kernel.org>2017-03-16 09:46:26 +0100
commit15ff991e8047561bb4a4e800ec60f60939be5fd4 (patch)
tree1a1fc00322da61ae37fcfd5288d7d7b4770ceefc /kernel/sched/core.c
parent5704ac0ae7f59581a264f45ddfc0ab4235aa052a (diff)
downloadop-kernel-dev-15ff991e8047561bb4a4e800ec60f60939be5fd4.zip
op-kernel-dev-15ff991e8047561bb4a4e800ec60f60939be5fd4.tar.gz
sched/core: Avoid double update_rq_clock() in move_queued_task()
Address this case: WARNING: CPU: 0 PID: 2070 at ../kernel/sched/core.c:109 update_rq_clock+0x74/0x80 rq->clock_update_flags & RQCF_UPDATED Call Trace: update_rq_clock() move_queued_task() __set_cpus_allowed_ptr() ... Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'kernel/sched/core.c')
-rw-r--r--kernel/sched/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index c6be770..c762f62 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -948,7 +948,7 @@ static struct rq *move_queued_task(struct rq *rq, struct rq_flags *rf,
lockdep_assert_held(&rq->lock);
p->on_rq = TASK_ON_RQ_MIGRATING;
- dequeue_task(rq, p, 0);
+ dequeue_task(rq, p, DEQUEUE_NOCLOCK);
set_task_cpu(p, new_cpu);
rq_unlock(rq, rf);
@@ -987,6 +987,7 @@ static struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf,
if (!cpumask_test_cpu(dest_cpu, &p->cpus_allowed))
return rq;
+ update_rq_clock(rq);
rq = move_queued_task(rq, rf, p, dest_cpu);
return rq;
OpenPOWER on IntegriCloud