diff options
author | Patrick Bellasi <patrick.bellasi@arm.com> | 2015-06-22 18:11:44 +0100 |
---|---|---|
committer | Jaesung Chung <jaesung@google.com> | 2017-06-26 17:17:44 +0900 |
commit | a4623efeb24a3516e35af412caf9b1fb076a9d24 (patch) | |
tree | 38dbed12d3838ca2568f2ca0046fb63c62ca9f81 /kernel/sched/tune.c | |
parent | c2a6c0f43d93e36e367f40ad392716dd9ad80a81 (diff) | |
download | imx-v4.1-a4623efeb24a3516e35af412caf9b1fb076a9d24.tar.gz |
ANDROID: sched/tune: add sysctl interface to define a boost value
The current (CFS) scheduler implementation does not allow "to boost"
tasks performance by running them at a higher OPP compared to the
minimum required to meet their workload demands.
To support tasks performance boosting the scheduler should provide a
"knob" which allows to tune how much the system is going to be optimised
for energy efficiency vs performance.
This patch is the first of a series which provides a simple interface to
define a tuning knob. One system-wide "boost" tunable is exposed via:
/proc/sys/kernel/sched_cfs_boost
which can be configured in the range [0..100], to define a percentage
where:
- 0% boost requires to operate in "standard" mode by scheduling
tasks at the minimum capacities required by the workload demand
- 100% boost requires to push at maximum the task performances,
"regardless" of the incurred energy consumption
A boost value in between these two boundaries is used to bias the
power/performance trade-off, the higher the boost value the more the
scheduler is biased toward performance boosting instead of energy
efficiency.
cc: Ingo Molnar <mingo@redhat.com>
cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Patrick Bellasi <patrick.bellasi@arm.com>
Signed-off-by: Andres Oportus <andresoportus@google.com>
Bug: 62598057
Change-Id: I33c5e5a3406dddee2005786f4d97c56334c4662b
(cherry picked from commit 69fa4c768a73c25b9b3f26d074295c53f839a57c)
Diffstat (limited to 'kernel/sched/tune.c')
-rw-r--r-- | kernel/sched/tune.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/kernel/sched/tune.c b/kernel/sched/tune.c new file mode 100644 index 000000000000..a93af9c2f267 --- /dev/null +++ b/kernel/sched/tune.c @@ -0,0 +1,16 @@ +#include "sched.h" + +unsigned int sysctl_sched_cfs_boost __read_mostly; + +int +sysctl_sched_cfs_boost_handler(struct ctl_table *table, int write, + void __user *buffer, size_t *lenp, + loff_t *ppos) +{ + int ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos); + + if (ret || !write) + return ret; + + return 0; +} |