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

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

From: Yue Hu <zbestahu@gmail.com>
Date: 2021-02-15 07:11:47
Also in: lkml

On Mon, 15 Feb 2021 12:00:08 +0530
Viresh Kumar [off-list ref] wrote:
On 14-02-21, 11:44, Yue Hu wrote:
quoted
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.
Okay, clear.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help