aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-gadget.h
diff options
context:
space:
mode:
authorXuewen Yan <[email protected]>2023-07-19 21:05:27 +0800
committerIngo Molnar <[email protected]>2023-10-05 22:09:50 +0200
commit9e0bc36ab07c550d791bf17feeb479f1dfc42d89 (patch)
treee38c663c9e93ad208900cfdcc8e99095dcd5209b /drivers/usb/cdns3/cdns3-gadget.h
parent650cad561cce04b62a8c8e0446b685ef171bc3bb (diff)
cpufreq: schedutil: Update next_freq when cpufreq_limits change
When cpufreq's policy is 'single', there is a scenario that will cause sg_policy's next_freq to be unable to update. When the CPU's util is always max, the cpufreq will be max, and then if we change the policy's scaling_max_freq to be a lower freq, indeed, the sg_policy's next_freq need change to be the lower freq, however, because the cpu_is_busy, the next_freq would keep the max_freq. For example: The cpu7 is a single CPU: unisoc:/sys/devices/system/cpu/cpufreq/policy7 # while true;do done& [1] 4737 unisoc:/sys/devices/system/cpu/cpufreq/policy7 # taskset -p 80 4737 pid 4737's current affinity mask: ff pid 4737's new affinity mask: 80 unisoc:/sys/devices/system/cpu/cpufreq/policy7 # cat scaling_max_freq 2301000 unisoc:/sys/devices/system/cpu/cpufreq/policy7 # cat scaling_cur_freq 2301000 unisoc:/sys/devices/system/cpu/cpufreq/policy7 # echo 2171000 > scaling_max_freq unisoc:/sys/devices/system/cpu/cpufreq/policy7 # cat scaling_max_freq 2171000 At this time, the sg_policy's next_freq would stay at 2301000, which is wrong. To fix this, add a check for the ->need_freq_update flag. [ mingo: Clarified the changelog. ] Co-developed-by: Guohua Yan <[email protected]> Signed-off-by: Xuewen Yan <[email protected]> Signed-off-by: Guohua Yan <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Acked-by: "Rafael J. Wysocki" <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-gadget.h')
0 files changed, 0 insertions, 0 deletions