[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <157140289031.29376.17217031888705940708.tip-bot2@tip-bot2>
Date: Fri, 18 Oct 2019 12:48:10 -0000
From: "tip-bot2 for Valentin Schneider" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Valentin Schneider <valentin.schneider@....com>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>, mingo@...nel.org,
vincent.guittot@...aro.org, juri.lelli@...hat.com,
seto.hidetoshi@...fujitsu.com, qperret@...gle.com,
Dietmar.Eggemann@....com, morten.rasmussen@....com,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org
Subject: [tip: sched/core] sched/topology: Don't set SD_BALANCE_WAKE on cpuset
domain relax
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 9ae7ab20b4835dbea0e5fc6a5c70171dc354a72e
Gitweb: https://git.kernel.org/tip/9ae7ab20b4835dbea0e5fc6a5c70171dc354a72e
Author: Valentin Schneider <valentin.schneider@....com>
AuthorDate: Mon, 14 Oct 2019 17:44:08 +01:00
Committer: Peter Zijlstra <peterz@...radead.org>
CommitterDate: Thu, 17 Oct 2019 21:31:54 +02:00
sched/topology: Don't set SD_BALANCE_WAKE on cpuset domain relax
As pointed out in commit
182a85f8a119 ("sched: Disable wakeup balancing")
SD_BALANCE_WAKE is a tad too aggressive, and is usually left unset.
However, it turns out cpuset domain relaxation will unconditionally set it
on domains below the relaxation level. This made sense back when
SD_BALANCE_WAKE was set unconditionally, but it no longer is the case.
We can improve things slightly by noticing that set_domain_attribute() is
always called after sd_init(), so rather than setting flags we can rely on
whatever sd_init() is doing and only clear certain flags when above the
relaxation level.
While at it, slightly clean up the function and flip the relax level
check to be more human readable.
Signed-off-by: Valentin Schneider <valentin.schneider@....com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
Cc: mingo@...nel.org
Cc: vincent.guittot@...aro.org
Cc: juri.lelli@...hat.com
Cc: seto.hidetoshi@...fujitsu.com
Cc: qperret@...gle.com
Cc: Dietmar.Eggemann@....com
Cc: morten.rasmussen@....com
Link: https://lkml.kernel.org/r/20191014164408.32596-1-valentin.schneider@arm.com
---
kernel/sched/topology.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index b5667a2..3623ffe 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -1201,16 +1201,13 @@ static void set_domain_attribute(struct sched_domain *sd,
if (!attr || attr->relax_domain_level < 0) {
if (default_relax_domain_level < 0)
return;
- else
- request = default_relax_domain_level;
+ request = default_relax_domain_level;
} else
request = attr->relax_domain_level;
- if (request < sd->level) {
+
+ if (sd->level > request) {
/* Turn off idle balance on this domain: */
sd->flags &= ~(SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE);
- } else {
- /* Turn on idle balance on this domain: */
- sd->flags |= (SD_BALANCE_WAKE|SD_BALANCE_NEWIDLE);
}
}
Powered by blists - more mailing lists