Skip to contentSkip to conversation

sched: remove redundant on_rq status change

PATCH Applied Wang Hui 2 participants 2 messages Jul 21, 2021 – Aug 5, 2021 Scheduler

lore
Share & tools
lore

Wang Hui

author
#0 lore raw

PATCH 1/1 sched: remove redundant on_rq status change

activate_task/deactivate_task will change on_rq status, no need to do it again.

---
 kernel/sched/core.c | 2 --
 1 file changed, 2 deletions(-)
kernel/sched/core.c +0 -2
index 014ce8b385c7..a0c35da186d0 100644
@@ -5679,11 +5679,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);
 
Signature · 1 line
2.29.0
merge bot Applied
#1 lore raw
The following commit has been merged into the sched/core branch of tip:

The following commit has been merged into the sched/core branch of tip:

Commit-ID:     f912d051619d11411867f642d2004928eb0b41b1
Gitweb:        https://git.kernel.org/tip/f912d051619d11411867f642d2004928eb0b41b1
Author:        Wang Hui <[email protected]>
AuthorDate:    Wed, 21 Jul 2021 17:11:09 +08:00
Committer:     Peter Zijlstra <[email protected]>
CommitterDate: Wed, 04 Aug 2021 15:16:43 +02:00

sched: remove redundant on_rq status change

activate_task/deactivate_task will change on_rq status, no need to do it again.

---
 kernel/sched/core.c | 2 --
 1 file changed, 2 deletions(-)
kernel/sched/core.c +0 -2
index 0c22cd0..6c562ad 100644
@@ -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);