Re: [PATCH 1/2] cpufreq_schedutil: Refactor sugov_cpu_is_busy()
From: Tejun Heo
Date: Wed Jun 19 2024 - 14:58:07 EST
Hello, Christian.
On Wed, Jun 19, 2024 at 03:07:32PM +0100, Christian Loehle wrote:
> > + if (sugov_hold_freq(sg_cpu) && next_f < sg_policy->next_freq &&
> > !sg_policy->need_freq_update) {
> > next_f = sg_policy->next_freq;
> >
>
> Not necessarily related to your changes, but in case you're touching this
> again, maybe sugov_hold_freq() could be the last condition?
I'll update the patch so that sugov_hold_freq() is the last condition.
> And do we want something like
> #ifdef CONFIG_NO_HZ_COMMON
> else
> sg_cpu->saved_idle_calls = tick_nohz_get_idle_calls_cpu(sg_cpu->cpu);
> #endif
> here?
I have no idea but if something like the above is necessary, it'd probably
fit better in the #else definition of sugof_hold_freq() or just move the
#ifdef inside the function body so that the common part is outside?
Thanks.
--
tejun