Skip to content

Commit

Permalink
sched: remove redundant on_rq status change
Browse files Browse the repository at this point in the history
activate_task/deactivate_task will change on_rq status,
no need to do it again.

Signed-off-by: Wang Hui <john.wanghui@huawei.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210721091109.1406043-1-john.wanghui@huawei.com
  • Loading branch information
Wang Hui authored and Peter Zijlstra committed Aug 4, 2021
1 parent 1c6829c commit f912d05
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5659,11 +5659,9 @@ static bool try_steal_cookie(int this, int that)
if (p->core_occupation > dst->idle->core_occupation)
goto next;

p->on_rq = TASK_ON_RQ_MIGRATING;
deactivate_task(src, p, 0);
set_task_cpu(p, this);
activate_task(dst, p, 0);
p->on_rq = TASK_ON_RQ_QUEUED;

resched_curr(dst);

Expand Down

0 comments on commit f912d05

Please sign in to comment.