[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1608014930-5144-1-git-send-email-xiaoggchen@tencent.com>
Date: Tue, 15 Dec 2020 14:48:50 +0800
From: chenxg1x@...il.com
To: linux-kernel@...r.kernel.org
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
vincent.guittot@...aro.org, dietmar.eggemann@....com,
rostedt@...dmis.org, bsegall@...gle.com, mgorman@...e.de,
bristot@...hat.com, heddchen@...cent.com, xiaoggchen@...cent.com
Subject: [PATCH] sched: don't check rq after newidle_balance return positive
From: Chen Xiaoguang <xiaoggchen@...cent.com>
In pick_next_task_fair, if CPU is going to idle newidle_balance
is called first trying to pull some tasks.
When newidle_balance returns positive which means it does
pulls tasks or some tasks enqueued then there is no need to check
sched_fair_runnable again.
Signed-off-by: He Chen <heddchen@...cent.com>
Signed-off-by: Xiaoguang Chen <xiaoggchen@...cent.com>
---
kernel/sched/fair.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index ae7ceba..c2f7eac 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -7004,10 +7004,9 @@ struct task_struct *
struct task_struct *p;
int new_tasks;
-again:
if (!sched_fair_runnable(rq))
goto idle;
-
+again:
#ifdef CONFIG_FAIR_GROUP_SCHED
if (!prev || prev->sched_class != &fair_sched_class)
goto simple;
--
1.8.3.1
Powered by blists - more mailing lists