From: chenxg1x@gmail.com
To: linux-kernel@vger.kernel.org
Cc: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com,
vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de,
bristot@redhat.com, heddchen@tencent.com, xiaoggchen@tencent.com
Subject: [PATCH] sched: don't check rq after newidle_balance return positive
Date: Tue, 15 Dec 2020 14:48:50 +0800 [thread overview]
Message-ID: <1608014930-5144-1-git-send-email-xiaoggchen@tencent.com> (raw)
From: Chen Xiaoguang <xiaoggchen@tencent.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@tencent.com>
Signed-off-by: Xiaoguang Chen <xiaoggchen@tencent.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
next reply other threads:[~2020-12-15 6:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-15 6:48 chenxg1x [this message]
2020-12-15 8:32 ` Peter Zijlstra
2020-12-16 9:44 ` 答复: [PATCH] sched: don't check rq after newidle_balance return positive(Internet mail) xiaoggchen(陈小光)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1608014930-5144-1-git-send-email-xiaoggchen@tencent.com \
--to=chenxg1x@gmail.com \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=heddchen@tencent.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
--cc=xiaoggchen@tencent.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®