aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2015-04-08 14:34:25 +0200
committerVincent Guittot <vincent.guittot@linaro.org>2015-04-22 09:17:50 +0200
commitd38aa541bacae8e176498f5e9919a0e233d503bb (patch)
tree9f4dc89ec94e073382b5211dab383e6dd7dc89cf
parent2217dcd805259f41473fe11b6863c71a0f66169e (diff)
sched: fix power/perf thresholdtest-sched-packing
-rw-r--r--arch/arm/kernel/topology.c29
1 files changed, 9 insertions, 20 deletions
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c
index dd945f76fefd..efb4a196b47a 100644
--- a/arch/arm/kernel/topology.c
+++ b/arch/arm/kernel/topology.c
@@ -284,44 +284,33 @@ static inline int cpu_corepower_flags(void)
* power threshold should be filled according to platform info that can come
* from DT as an example. For now use default table
*/
-static int core_pack_threshold[8][2] = {
+static int core_pack_threshold[2][2] = {
/* pack, perf */
{ 30, 100},
- { 30, 100},
- { 30, 100},
- { 30, 100},
- { 20, 100},
- { 20, 100},
- { 20, 100},
{ 20, 100},
};
static int cpu_core_th(int cpu, int index)
{
- if (cpu < 8)
- return (core_pack_threshold[cpu][index] * 1024) / 100 ;
+ if (arch_scale_cpu_capacity(cpu, NULL) < SCHED_CAPACITY_SCALE)
+ return (core_pack_threshold[1][index] * 1024) / 100;
- return 0;
+ return (core_pack_threshold[0][index] * 1024) / 100;
}
-static int cluster_pack_threshold[8][2] = {
+static int cluster_pack_threshold[2][2] = {
/* pack, perf */
{ 0, 100},
- { 0, 100},
- { 0, 100},
- { 0, 100},
- { 50, 70},
- { 50, 70},
- { 50, 70},
{ 50, 70},
};
static int cpu_cluster_th(int cpu, int index)
{
- if (cpu < 8)
- return (cluster_pack_threshold[cpu][index] * 1024) / 100;
- return 0;
+ if (arch_scale_cpu_capacity(cpu, NULL) < SCHED_CAPACITY_SCALE)
+ return (cluster_pack_threshold[1][index] * 1024) / 100;
+
+ return (cluster_pack_threshold[0][index] * 1024) / 100;
}
static struct sched_domain_topology_level arm_topology[] = {