[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1413958051-7103-2-git-send-email-mturquette@linaro.org>
Date: Tue, 21 Oct 2014 23:07:25 -0700
From: Mike Turquette <mturquette@...aro.org>
To: peterz@...radead.org, mingo@...nel.org
Cc: linux-kernel@...r.kernel.org, preeti@...ux.vnet.ibm.com,
Morten.Rasmussen@....com, kamalesh@...ux.vnet.ibm.com,
riel@...hat.com, efault@....de, nicolas.pitre@...aro.org,
linaro-kernel@...ts.linaro.org, daniel.lezcano@...aro.org,
dietmar.eggemann@....com, pjt@...gle.com, bsegall@...gle.com,
vincent.guittot@...aro.org, patches@...aro.org,
tuukka.tikkanen@...aro.org, amit.kucheria@...aro.org,
Morten Rasmussen <morten.rasmussen@....com>,
Mike Turquette <mturquette@...aro.org>
Subject: [PATCH RFC 1/7] sched: Make energy awareness a sched feature
From: Morten Rasmussen <morten.rasmussen@....com>
This patch introduces the ENERGY_AWARE sched feature, which is
implemented using jump labels when SCHED_DEBUG is defined. It is
statically set false when SCHED_DEBUG is not defined. Hence this doesn't
allow energy awareness to be enabled without SCHED_DEBUG. This
sched_feature knob will be replaced later with a more appropriate
control knob when things have matured a bit.
Signed-off-by: Morten Rasmussen <morten.rasmussen@....com>
Signed-off-by: Mike Turquette <mturquette@...aro.org>
[mturquette@...aro.org: moved energy_aware above enqueue_task_fair]
---
kernel/sched/fair.c | 5 +++++
kernel/sched/features.h | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6738160..90b36cc 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3978,6 +3978,11 @@ static inline void hrtick_update(struct rq *rq)
}
#endif
+static inline bool energy_aware(void)
+{
+ return sched_feat(ENERGY_AWARE);
+}
+
/*
* The enqueue_task method is called before nr_running is
* increased. Here we update the fair scheduling stats and
diff --git a/kernel/sched/features.h b/kernel/sched/features.h
index 90284d1..199ee3a 100644
--- a/kernel/sched/features.h
+++ b/kernel/sched/features.h
@@ -83,3 +83,9 @@ SCHED_FEAT(NUMA_FAVOUR_HIGHER, true)
*/
SCHED_FEAT(NUMA_RESIST_LOWER, false)
#endif
+
+/*
+ * Energy aware scheduling. Use platform energy model to guide scheduling
+ * decisions optimizing for energy efficiency.
+ */
+SCHED_FEAT(ENERGY_AWARE, false)
--
1.8.3.2
--
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