lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210222053014.s45odi3qsfio2ahp@vireshk-i7>
Date:   Mon, 22 Feb 2021 11:00:14 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Yue Hu <zbestahu@...il.com>
Cc:     rjw@...ysocki.net, mingo@...hat.com, peterz@...radead.org,
        juri.lelli@...hat.com, vincent.guittot@...aro.org,
        dietmar.eggemann@....com, rostedt@...dmis.org, bsegall@...gle.com,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        huyue2@...ong.com, zbestahu@....com
Subject: Re: [PATCH] cpufreq: schedutil: Don't consider freq reduction to
 busy CPU if need_freq_update is set

On 19-02-21, 19:45, Yue Hu wrote:
> We will set next_f to next_freq(previous freq) if next_f is
> reduced for busy CPU. Then the next sugov_update_next_freq() will check
> if next_freq matches next_f if need_freq_update is not set.
> Obviously, we will do nothing for the case. And The related check to
> fast_switch_enabled and raw_spin_{lock,unlock} operations are
> unnecessary.

Right, but we will still need sugov_update_next_freq() to have the
same implementation regardless and so I am not sure if we should add
this change:

diff --git a/kernel/sched/cpufreq_schedutil.c b/kernel/sched/cpufreq_schedutil.c
index 41e498b0008a..7289e1adab73 100644
--- a/kernel/sched/cpufreq_schedutil.c
+++ b/kernel/sched/cpufreq_schedutil.c
@@ -362,6 +362,9 @@ static void sugov_update_single_freq(struct update_util_data *hook, u64 time,
         * recently, as the reduction is likely to be premature then.
         */
        if (sugov_cpu_is_busy(sg_cpu) && next_f < sg_policy->next_freq) {
+               if (!sg_policy->need_freq_update)
+                       return;
+
                next_f = sg_policy->next_freq;
 
                /* Restore cached freq as next_freq has changed */


-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ