sched: enable hmp, power aware scheduling for targets with > 4 CPUs

Enabling and disabling hmp/power-aware scheduling is meant to be done
via kernel command line options. Until that is fully supported however,
take advantage of the fact that current targets with more than 4 CPUs
will need these features.

Change-Id: I4916805881d58eeb54747e4b972816ffc96caae7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
This commit is contained in:
Steve Muckle 2014-07-22 14:10:15 -07:00 committed by David Keitel
parent f27b626521
commit b32244628f
2 changed files with 10 additions and 2 deletions

View file

@ -8308,6 +8308,14 @@ void __init sched_init(void)
int i, j;
unsigned long alloc_size = 0, ptr;
#ifdef CONFIG_SCHED_HMP
if (num_possible_cpus() > 4)
sched_enable_hmp = sched_enable_power_aware = 1;
if (sched_enable_hmp)
pr_info("HMP scheduling enabled.\n");
#endif
BUG_ON(num_possible_cpus() > BITS_PER_LONG);
#ifdef CONFIG_FAIR_GROUP_SCHED

View file

@ -2564,7 +2564,7 @@ unsigned int max_task_load(void)
#ifdef CONFIG_SCHED_HMP
/* Use this knob to turn on or off HMP-aware task placement logic */
unsigned int __read_mostly sched_enable_hmp = 1;
unsigned int __read_mostly sched_enable_hmp = 0;
/* A cpu can no longer accomodate more tasks if:
*
@ -2585,7 +2585,7 @@ unsigned int __read_mostly sysctl_sched_mostly_idle_nr_run = 3;
* Control whether or not individual CPU power consumption is used to
* guide task placement.
*/
unsigned int __read_mostly sched_enable_power_aware = 1;
unsigned int __read_mostly sched_enable_power_aware = 0;
/*
* This specifies the maximum percent power difference between 2