Loading arch/arm/kernel/topology.c +9 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,13 @@ static void set_power_scale(unsigned int cpu, unsigned long power) per_cpu(cpu_scale, cpu) = power; } static DEFINE_PER_CPU(unsigned long, cpu_efficiency) = SCHED_POWER_SCALE; unsigned long arch_get_cpu_efficiency(int cpu) { return per_cpu(cpu_efficiency, cpu); } #ifdef CONFIG_OF struct cpu_efficiency { const char *compatible; Loading Loading @@ -117,6 +124,8 @@ static void __init parse_dt_topology(void) if (cpu_eff->compatible == NULL) continue; per_cpu(cpu_efficiency, cpu) = cpu_eff->efficiency; rate = of_get_property(cn, "clock-frequency", &len); if (!rate || len != 4) { pr_err("%s missing clock-frequency property\n", Loading arch/arm64/configs/msm8994-perf_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y CONFIG_CGROUP_SCHED=y CONFIG_RT_GROUP_SCHED=y CONFIG_SCHED_HMP=y CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_IPC_NS is not set Loading Loading @@ -47,6 +48,7 @@ CONFIG_PM_WAKELOCKS_LIMIT=0 CONFIG_PM_RUNTIME=y CONFIG_SUSPEND_TIME=y CONFIG_CPU_FREQ=y CONFIG_SCHED_FREQ_INPUT=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y Loading arch/arm64/configs/msm8994_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y CONFIG_CGROUP_SCHED=y CONFIG_RT_GROUP_SCHED=y CONFIG_SCHED_HMP=y CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_IPC_NS is not set Loading Loading @@ -47,6 +48,7 @@ CONFIG_PM_WAKELOCKS_LIMIT=0 CONFIG_PM_RUNTIME=y CONFIG_SUSPEND_TIME=y CONFIG_CPU_FREQ=y CONFIG_SCHED_FREQ_INPUT=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y Loading arch/arm64/kernel/topology.c +9 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,13 @@ static unsigned long *__cpu_capacity; static unsigned long middle_capacity = 1; static DEFINE_PER_CPU(unsigned long, cpu_efficiency) = SCHED_POWER_SCALE; unsigned long arch_get_cpu_efficiency(int cpu) { return per_cpu(cpu_efficiency, cpu); } /* * Iterate all CPUs' descriptor in DT and compute the efficiency * (as per table_efficiency). Also calculate a middle efficiency Loading Loading @@ -295,6 +302,8 @@ static void __init parse_dt_cpu_power(void) continue; } per_cpu(cpu_efficiency, cpu) = cpu_eff->efficiency; rate = of_get_property(cn, "clock-frequency", &len); if (!rate || len != 4) { pr_err("%s: Missing clock-frequency property\n", Loading drivers/cpufreq/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,16 @@ if CPU_FREQ config CPU_FREQ_GOV_COMMON bool config SCHED_FREQ_INPUT bool "Scheduler inputs to cpufreq governor" depends on SMP && FAIR_GROUP_SCHED help This option enables support for scheduler based CPU utilization calculations which may then be used by any cpufreq governor. The scheduler keeps track of "recent" cpu demand of tasks, which can help determine need for changing frequency well in advance of what a governor would have been able to detect on its own. config CPU_FREQ_STAT tristate "CPU frequency translation statistics" default y Loading Loading
arch/arm/kernel/topology.c +9 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,13 @@ static void set_power_scale(unsigned int cpu, unsigned long power) per_cpu(cpu_scale, cpu) = power; } static DEFINE_PER_CPU(unsigned long, cpu_efficiency) = SCHED_POWER_SCALE; unsigned long arch_get_cpu_efficiency(int cpu) { return per_cpu(cpu_efficiency, cpu); } #ifdef CONFIG_OF struct cpu_efficiency { const char *compatible; Loading Loading @@ -117,6 +124,8 @@ static void __init parse_dt_topology(void) if (cpu_eff->compatible == NULL) continue; per_cpu(cpu_efficiency, cpu) = cpu_eff->efficiency; rate = of_get_property(cn, "clock-frequency", &len); if (!rate || len != 4) { pr_err("%s missing clock-frequency property\n", Loading
arch/arm64/configs/msm8994-perf_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y CONFIG_CGROUP_SCHED=y CONFIG_RT_GROUP_SCHED=y CONFIG_SCHED_HMP=y CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_IPC_NS is not set Loading Loading @@ -47,6 +48,7 @@ CONFIG_PM_WAKELOCKS_LIMIT=0 CONFIG_PM_RUNTIME=y CONFIG_SUSPEND_TIME=y CONFIG_CPU_FREQ=y CONFIG_SCHED_FREQ_INPUT=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y Loading
arch/arm64/configs/msm8994_defconfig +2 −0 Original line number Diff line number Diff line Loading @@ -11,6 +11,7 @@ CONFIG_CGROUP_CPUACCT=y CONFIG_RESOURCE_COUNTERS=y CONFIG_CGROUP_SCHED=y CONFIG_RT_GROUP_SCHED=y CONFIG_SCHED_HMP=y CONFIG_NAMESPACES=y # CONFIG_UTS_NS is not set # CONFIG_IPC_NS is not set Loading Loading @@ -47,6 +48,7 @@ CONFIG_PM_WAKELOCKS_LIMIT=0 CONFIG_PM_RUNTIME=y CONFIG_SUSPEND_TIME=y CONFIG_CPU_FREQ=y CONFIG_SCHED_FREQ_INPUT=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y CONFIG_CPU_FREQ_GOV_USERSPACE=y CONFIG_CPU_FREQ_GOV_ONDEMAND=y Loading
arch/arm64/kernel/topology.c +9 −0 Original line number Diff line number Diff line Loading @@ -212,6 +212,13 @@ static unsigned long *__cpu_capacity; static unsigned long middle_capacity = 1; static DEFINE_PER_CPU(unsigned long, cpu_efficiency) = SCHED_POWER_SCALE; unsigned long arch_get_cpu_efficiency(int cpu) { return per_cpu(cpu_efficiency, cpu); } /* * Iterate all CPUs' descriptor in DT and compute the efficiency * (as per table_efficiency). Also calculate a middle efficiency Loading Loading @@ -295,6 +302,8 @@ static void __init parse_dt_cpu_power(void) continue; } per_cpu(cpu_efficiency, cpu) = cpu_eff->efficiency; rate = of_get_property(cn, "clock-frequency", &len); if (!rate || len != 4) { pr_err("%s: Missing clock-frequency property\n", Loading
drivers/cpufreq/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,16 @@ if CPU_FREQ config CPU_FREQ_GOV_COMMON bool config SCHED_FREQ_INPUT bool "Scheduler inputs to cpufreq governor" depends on SMP && FAIR_GROUP_SCHED help This option enables support for scheduler based CPU utilization calculations which may then be used by any cpufreq governor. The scheduler keeps track of "recent" cpu demand of tasks, which can help determine need for changing frequency well in advance of what a governor would have been able to detect on its own. config CPU_FREQ_STAT tristate "CPU frequency translation statistics" default y Loading