[PATCH 0/2] sched/cpufreq: Fix schedutil's boost frequency handling

Sibi Sankar <[email protected]>
Newsgroups org.kernel.vger.linux-pm,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
capacity_freq_ref, exposed to schedutil via get_capacity_ref_freq(),
was introduced by commit 9942cb22ea45 ("sched/topology: Add a new
arch_scale_freq_ref() method") as a fixed anchor that does not move at
runtime. However, schedutil uses that same fixed anchor as the reference
plugged into map_util_freq() which saturates exactly at capacity_freq_ref.
As a result, a system with cpufreq boost enabled effectively never runs at
boost frequencies under schedutil-governed load.

This series fixes this by plugging in policy-max into the map_util_freq
equation and allowing cpuinfo max to fallback to a non-boost value when
disabled.

Drivers that rely on the current behaviour (upward bump only) may be
affected; We should handle such cases in the driver side without
breaking core behaviour.

Logs:

# cd /sys/devices/system/cpu/cpufreq/
# ls
boost  policy0  policy12  policy6
# cat boost
0
# cat policy6/scaling_max_freq
4454400
# echo 1 > boost
# cat policy6/scaling_max_freq
4723200
# echo 0 > boost
# cat policy6/scaling_max_freq
4723200

# echo 1 > boost
# cat policy6/stats/time_in_state
355200 36958
4454400 650
4588800 0
4723200 0
#

Logs: With this series

# cd /sys/devices/system/cpu/cpufreq/
# ls
boost  policy0  policy12  policy6
# cat boost
0
# cat policy6/scaling_max_freq
4454400
# echo 1 > boost
# cat policy6/scaling_max_freq
4723200
# echo 0 > policy6/boost
# cat policy6/scaling_max_freq
4454400

# cat policy6/boost
0

# cat policy6/stats/time_in_state
355200 40147
4454400 79
4588800 0
4723200 0

# echo 1 > policy6/boost

# cat policy6/stats/time_in_state
355200 44834
4454400 93
4588800 25
4723200 569

Ananthu C V (1):
  cpufreq: allow cpuinfo max to decrease when boost is disabled

Sibi Sankar (1):
  sched/cpufreq: Update schedutil's DVFS request to reach the boost
    frequencies

 drivers/cpufreq/freq_table.c     |  7 +------
 kernel/sched/cpufreq_schedutil.c | 13 ++++++++++---
 2 files changed, 11 insertions(+), 9 deletions(-)


base-commit: 0f6da28aab51b16762ed82e8fdeaa5042da45b08
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.