[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1446811367-23783-3-git-send-email-a.krasnov@samsung.com>
Date: Fri, 06 Nov 2015 15:02:36 +0300
From: Arseniy Krasnov <a.krasnov@...sung.com>
To: linux@....linux.org.uk, mingo@...hat.com, peterz@...radead.org
Cc: a.krasnov@...sung.com, v.tyrtov@...sung.com,
s.rogachev@...sung.com, linux-kernel@...r.kernel.org,
Tarek Dakhran <t.dakhran@...sung.com>,
Sergey Dyasly <s.dyasly@...sung.com>,
Dmitriy Safonov <d.safonov@...tner.samsung.com>,
Ilya Maximets <i.maximets@...sung.com>
Subject: [PATCH 02/13] hperf_hmp: introduce hew domain flag.
New scheduler domain type: HMP. Each big.LITTLE cluster is detected by
scheduler as HMP domain. HPERF_HMP logic works between two HMP domains, the
default CFS logic, in turn, works inside the HMP domain.
Signed-off-by: Tarek Dakhran <t.dakhran@...sung.com>
Signed-off-by: Sergey Dyasly <s.dyasly@...sung.com>
Signed-off-by: Dmitriy Safonov <d.safonov@...tner.samsung.com>
Signed-off-by: Arseniy Krasnov <a.krasnov@...sung.com>
Signed-off-by: Ilya Maximets <i.maximets@...sung.com>
---
arch/arm/kernel/topology.c | 6 +++++-
include/linux/sched.h | 4 ++++
kernel/sched/core.c | 9 ++++++++-
3 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index 08b7847..7fcc5fe 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -285,7 +285,11 @@ static struct sched_domain_topology_level arm_topology[] = {
{ cpu_corepower_mask, cpu_corepower_flags, SD_INIT_NAME(GMC) },
{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
#endif
- { cpu_cpu_mask, SD_INIT_NAME(DIE) },
+ { cpu_cpu_mask,
+#ifdef CONFIG_HPERF_HMP
+ .flags = SD_HMP_BALANCE,
+#endif
+ SD_INIT_NAME(DIE)},
{ NULL, },
};
diff --git a/include/linux/sched.h b/include/linux/sched.h
index b7b9501..eb084df 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -990,6 +990,10 @@ extern void wake_up_q(struct wake_q_head *head);
#define SD_OVERLAP 0x2000 /* sched_domains of this level overlap */
#define SD_NUMA 0x4000 /* cross-node balancing */
+#ifdef CONFIG_HPERF_HMP
+#define SD_HMP_BALANCE 0x8000 /* Use HMP load balancing algorithm */
+#endif
+
#ifdef CONFIG_SCHED_SMT
static inline int cpu_smt_flags(void)
{
diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bcd214e..16092e0 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6410,6 +6410,9 @@ sd_init(struct sched_domain_topology_level *tl, int cpu)
| 0*SD_PREFER_SIBLING
| 0*SD_NUMA
| sd_flags
+#ifdef CONFIG_HPERF_HMP
+ | (tl->flags & SD_HMP_BALANCE)
+#endif
,
.last_balance = jiffies,
@@ -6472,7 +6475,11 @@ static struct sched_domain_topology_level default_topology[] = {
#ifdef CONFIG_SCHED_MC
{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },
#endif
- { cpu_cpu_mask, SD_INIT_NAME(DIE) },
+ { cpu_cpu_mask,
+#ifdef CONFIG_HPERF_HMP
+ .flags = SD_HMP_BALANCE,
+#endif
+ SD_INIT_NAME(DIE)},
{ NULL, },
};
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists