diff options
-rw-r--r-- | kernel/sched/core.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 442efe59d188..c7db597e8175 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -2546,7 +2546,6 @@ static struct rq *__migrate_task(struct rq *rq, struct rq_flags *rf, if (!is_cpu_allowed(p, dest_cpu)) return rq; - update_rq_clock(rq); rq = move_queued_task(rq, rf, p, dest_cpu); return rq; @@ -2604,10 +2603,12 @@ static int migration_cpu_stop(void *data) goto out; } - if (task_on_rq_queued(p)) + if (task_on_rq_queued(p)) { + update_rq_clock(rq); rq = __migrate_task(rq, &rf, p, arg->dest_cpu); - else + } else { p->wake_cpu = arg->dest_cpu; + } /* * XXX __migrate_task() can fail, at which point we might end |