[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <159784576699.3192.17019412360260680450.tip-bot2@tip-bot2>
Date: Wed, 19 Aug 2020 14:02:46 -0000
From: "tip-bot2 for Valentin Schneider" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Peter Zijlstra <peterz@...radead.org>,
Valentin Schneider <valentin.schneider@....com>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>, x86 <x86@...nel.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: [tip: sched/core] sched/topology: Use prebuilt SD flag degeneration mask
The following commit has been merged into the sched/core branch of tip:
Commit-ID: 6f349818621dff364fc000909135d0065e9756c9
Gitweb: https://git.kernel.org/tip/6f349818621dff364fc000909135d0065e9756c9
Author: Valentin Schneider <valentin.schneider@....com>
AuthorDate: Mon, 17 Aug 2020 12:29:54 +01:00
Committer: Ingo Molnar <mingo@...nel.org>
CommitterDate: Wed, 19 Aug 2020 10:49:48 +02:00
sched/topology: Use prebuilt SD flag degeneration mask
Leverage SD_DEGENERATE_GROUPS_MASK in sd_degenerate() and
sd_parent_degenerate().
Suggested-by: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Valentin Schneider <valentin.schneider@....com>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Link: https://lore.kernel.org/r/20200817113003.20802-9-valentin.schneider@arm.com
---
kernel/sched/topology.c | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
index cbdaf08..38e6671 100644
--- a/kernel/sched/topology.c
+++ b/kernel/sched/topology.c
@@ -160,15 +160,9 @@ static int sd_degenerate(struct sched_domain *sd)
return 1;
/* Following flags need at least 2 groups */
- if (sd->flags & (SD_BALANCE_NEWIDLE |
- SD_BALANCE_FORK |
- SD_BALANCE_EXEC |
- SD_SHARE_CPUCAPACITY |
- SD_ASYM_CPUCAPACITY |
- SD_SHARE_PKG_RESOURCES)) {
- if (sd->groups != sd->groups->next)
- return 0;
- }
+ if ((sd->flags & SD_DEGENERATE_GROUPS_MASK) &&
+ (sd->groups != sd->groups->next))
+ return 0;
/* Following flags don't use groups */
if (sd->flags & (SD_WAKE_AFFINE))
@@ -190,13 +184,7 @@ sd_parent_degenerate(struct sched_domain *sd, struct sched_domain *parent)
/* Flags needing groups don't count if only 1 group in parent */
if (parent->groups == parent->groups->next) {
- pflags &= ~(SD_BALANCE_NEWIDLE |
- SD_BALANCE_FORK |
- SD_BALANCE_EXEC |
- SD_ASYM_CPUCAPACITY |
- SD_SHARE_CPUCAPACITY |
- SD_SHARE_PKG_RESOURCES |
- SD_PREFER_SIBLING);
+ pflags &= ~(SD_DEGENERATE_GROUPS_MASK | SD_PREFER_SIBLING);
if (nr_node_ids == 1)
pflags &= ~SD_SERIALIZE;
}
Powered by blists - more mailing lists