[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1464001138-25063-16-git-send-email-morten.rasmussen@arm.com>
Date: Mon, 23 May 2016 11:58:57 +0100
From: Morten Rasmussen <morten.rasmussen@....com>
To: peterz@...radead.org, mingo@...hat.com
Cc: dietmar.eggemann@....com, yuyang.du@...el.com,
vincent.guittot@...aro.org, mgalbraith@...e.de,
linux-kernel@...r.kernel.org,
Morten Rasmussen <morten.rasmussen@....com>,
Russell King <linux@....linux.org.uk>
Subject: [PATCH 15/16] arm: Set SD_BALANCE_WAKE flag for asymmetric capacity systems
Asymmetric capacity systems (e.g. ARM big.LITTLE) can not rely
exclusively on fast idle-based task placement at wake-up in all
scenarios. Enable SD_BALANCE_WAKE to have the option to do
load/utilization based wake-up task placement (existing tasks) if affine
wake-up fails.
cc: Russell King <linux@....linux.org.uk>
Signed-off-by: Morten Rasmussen <morten.rasmussen@....com>
---
arch/arm/kernel/topology.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 1b81b31..32d0a1b 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -280,18 +280,27 @@ void store_cpu_topology(unsigned int cpuid)
static inline int cpu_corepower_flags(void)
{
- return SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN;
+ int flags = SD_SHARE_PKG_RESOURCES | SD_SHARE_POWERDOMAIN;
+
+ return big_little ? flags | SD_BALANCE_WAKE : flags;
+}
+
+static inline int arm_cpu_core_flags(void)
+{
+ int flags = SD_SHARE_PKG_RESOURCES;
+
+ return big_little ? flags | SD_BALANCE_WAKE : flags;
}
static inline int arm_cpu_cpu_flags(void)
{
- return big_little ? SD_ASYM_CPUCAPACITY : 0;
+ return big_little ? SD_ASYM_CPUCAPACITY | SD_BALANCE_WAKE : 0;
}
static struct sched_domain_topology_level arm_topology[] = {
#ifdef CONFIG_SCHED_MC
{ cpu_corepower_mask, cpu_corepower_flags, SD_INIT_NAME(GMC) },
- { cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
+ { cpu_coregroup_mask, arm_cpu_core_flags, SD_INIT_NAME(MC) },
#endif
{ cpu_cpu_mask, arm_cpu_cpu_flags, SD_INIT_NAME(DIE) },
{ NULL, },
--
1.9.1
Powered by blists - more mailing lists