Thread (6 messages) 6 messages, 4 authors, 2021-02-15

Re: [PATCH] cpufreq: schedutil: Don't use the limits_changed flag any more

From: Viresh Kumar <viresh.kumar@linaro.org>
Date: 2021-02-15 06:31:10
Also in: lkml

On 14-02-21, 11:44, Yue Hu wrote:
On Fri, 12 Feb 2021 17:14:03 +0100
"Rafael J. Wysocki" [off-list ref] wrote:
quoted
This may be running in parallel with sugov_update_next_freq() on a
different CPU, so the latter may clear need_freq_update right after it
has been set here unless I'm overlooking something.
Whether this logic is also happening for limits_changed in
sugo_should_update_freq() or not?
It is but it shouldn't have any side effects as we calculate the next
frequency after cleaning the limits_changed flag. Your patch would
have been fine, but it is not anymore because of commit 23a881852f3e
("cpufreq: schedutil: Don't skip freq update if need_freq_update is
set").

It made a considerable change after which your patch adds a bug. With
23a881852f3e, need_freq_update is updated/cleared after the next
frequency is calculated, while earlier it was cleared before it. And
so even with the race condition taking place, there were no issues.

-- 
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help