Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1263959

[PATCH 02/13] hperf_hmp: introduce hew domain flag.

From Arseniy Krasnov <a.krasnov@samsung.com>
Newsgroups linux.kernel
Subject [PATCH 02/13] hperf_hmp: introduce hew domain flag.
Date 2015-11-06 13:10 +0100
Message-ID <qrO0b-4jL-37@gated-at.bofh.it> (permalink)
References <qrO09-4jL-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


	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@samsung.com>
Signed-off-by: Sergey Dyasly <s.dyasly@samsung.com>
Signed-off-by: Dmitriy Safonov <d.safonov@partner.samsung.com>
Signed-off-by: Arseniy Krasnov <a.krasnov@samsung.com>
Signed-off-by: Ilya Maximets <i.maximets@samsung.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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/13] High performance balancing logic for big.LITTLE Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
  [PATCH 01/13] hperf_hmp: add new config for arm and arm64. Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
  [PATCH 02/13] hperf_hmp: introduce hew domain flag. Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
  [PATCH 13/13] hperf_hmp: cpufreq routines. Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
  [PATCH 07/13] hperf_hmp: migration auxiliary functions. Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
    Re: [PATCH 07/13] hperf_hmp: migration auxiliary functions. kbuild test robot <lkp@intel.com> - 2015-11-06 14:10 +0100
  [PATCH 10/13] hperf_hmp: idle pull function. Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
  [PATCH 08/13] hperf_hmp: swap tasks function. Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
  [PATCH 05/13] hperf_hmp: introduce druntime metric. Arseniy Krasnov <a.krasnov@samsung.com> - 2015-11-06 13:10 +0100
  Re: [PATCH 00/13] High performance balancing logic for big.LITTLE Peter Zijlstra <peterz@infradead.org> - 2015-11-07 11:00 +0100

csiph-web