From: Valentin Schneider <valentin.schneider@arm.com>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Daniel Bristot de Oliveira <bristot@redhat.com>
Subject: [PATCH v4 3/3] sched/fair: Dissociate wakeup decisions from SD flag value
Date: Mon, 2 Nov 2020 18:45:14 +0000 [thread overview]
Message-ID: <20201102184514.2733-4-valentin.schneider@arm.com> (raw)
In-Reply-To: <20201102184514.2733-1-valentin.schneider@arm.com>
The CFS wakeup code will only ever go through EAS / its fast path on
"regular" wakeups (i.e. not on forks or execs). These are currently gated
by a check against 'sd_flag', which would be SD_BALANCE_WAKE at wakeup.
However, we now have a flag that explicitly tells us whether a wakeup is a
"regular" one, so hinge those conditions on that flag instead.
Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
---
kernel/sched/fair.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index c02f7af0a925..4f9ff5d85ab2 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -6684,7 +6684,7 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
/* SD_flags and WF_flags share the first nibble */
int sd_flag = wake_flags & 0xF;
- if (sd_flag & SD_BALANCE_WAKE) {
+ if (wake_flags & WF_TTWU) {
record_wakee(p);
if (sched_energy_enabled()) {
@@ -6721,9 +6721,8 @@ select_task_rq_fair(struct task_struct *p, int prev_cpu, int wake_flags)
if (unlikely(sd)) {
/* Slow path */
new_cpu = find_idlest_cpu(sd, p, cpu, prev_cpu, sd_flag);
- } else if (sd_flag & SD_BALANCE_WAKE) { /* XXX always ? */
+ } else if (wake_flags & WF_TTWU) { /* XXX always ? */
/* Fast path */
-
new_cpu = select_idle_sibling(p, prev_cpu, new_cpu);
if (want_affine)
--
2.27.0
next prev parent reply other threads:[~2020-11-02 18:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 18:45 [PATCH v4 0/3] sched: Get rid of select_task_rq()'s sd_flag parameter Valentin Schneider
2020-11-02 18:45 ` [PATCH v4 1/3] sched: Add WF_TTWU, WF_EXEC wakeup flags Valentin Schneider
2020-11-11 8:23 ` [tip: sched/core] " tip-bot2 for Valentin Schneider
2020-11-02 18:45 ` [PATCH v4 2/3] sched: Remove select_task_rq()'s sd_flag parameter Valentin Schneider
2020-11-11 8:23 ` [tip: sched/core] " tip-bot2 for Valentin Schneider
2020-11-02 18:45 ` Valentin Schneider [this message]
2020-11-11 8:23 ` [tip: sched/core] sched/fair: Dissociate wakeup decisions from SD flag value tip-bot2 for Valentin Schneider
2020-11-10 12:52 ` [PATCH v4 0/3] sched: Get rid of select_task_rq()'s sd_flag parameter Peter Zijlstra
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=20201102184514.2733-4-valentin.schneider@arm.com \
--to=valentin.schneider@arm.com \
--cc=bristot@redhat.com \
--cc=dietmar.eggemann@arm.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=vincent.guittot@linaro.org \
/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®