[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240704092345.51644-1-sieberf@amazon.com>
Date: Thu, 4 Jul 2024 11:23:45 +0200
From: Fernand Sieber <sieberf@...zon.com>
To:
CC: <linux-kernel@...r.kernel.org>, Fernand Sieber <sieberf@...zon.com>, "Ingo
Molnar" <mingo@...hat.com>, Peter Zijlstra <peterz@...radead.org>, Juri Lelli
<juri.lelli@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>
Subject: [PATCH] sched/fair: Optimize vlag entity placement
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@...zon.com>
Cc: Ingo Molnar <mingo@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Juri Lelli <juri.lelli@...hat.com>
Cc: Vincent Guittot <vincent.guittot@...aro.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
Powered by blists - more mailing lists