Blob Blame History Raw
From b591d18a8594321999d4b204bfca8d3edd86c51c Mon Sep 17 00:00:00 2001
From: Wang Hui <john.wanghui@huawei.com>
Date: Wed, 21 Jul 2021 17:11:09 +0800
Subject: [PATCH] sched: remove redundant on_rq status change

Patch-mainline: v5.15-rc1
References: bsc#1189999 (Scheduler functional and performance backports)
Git-commit: f912d051619d11411867f642d2004928eb0b41b1

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
Signed-off-by: Mel Gorman <mgorman@suse.de>
---
 kernel/sched/core.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index d1ed1fc2cca4..57a2913f945f 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -5734,11 +5734,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);