From: Fernand Sieber <sieberf@amazon.com>
Cc: <linux-kernel@vger.kernel.org>,
Fernand Sieber <sieberf@amazon.com>,
"Ingo Molnar" <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: [PATCH] sched/fair: Optimize vlag entity placement
Date: Thu, 4 Jul 2024 11:23:45 +0200 [thread overview]
Message-ID: <20240704092345.51644-1-sieberf@amazon.com> (raw)
Optimize for common path when placing an entity with no lag.
Since adjusting a zero lag is always going to produce a zero lag regardless
of the local load, don't bother about calaculating the adjusting factor.
Signed-off-by: Fernand Sieber <sieberf@amazon.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Vincent Guittot <vincent.guittot@linaro.org>
---
kernel/sched/fair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 8a5b1ae0aa55..e78272c87274 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5190,7 +5190,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int flags)
*
* EEVDF: placement strategy #1 / #2
*/
- if (sched_feat(PLACE_LAG) && cfs_rq->nr_running) {
+ if (se->vlag && sched_feat(PLACE_LAG) && cfs_rq->nr_running) {
struct sched_entity *curr = cfs_rq->curr;
unsigned long load;
--
2.40.1
next reply other threads:[~2024-07-04 9:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-04 9:23 Fernand Sieber [this message]
2024-07-04 12:20 ` [PATCH] sched/fair: Optimize vlag entity placement Metin Kaya
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=20240704092345.51644-1-sieberf@amazon.com \
--to=sieberf@amazon.com \
--cc=juri.lelli@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.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