Re: [PATCH 1/2] cpufreq_schedutil: Refactor sugov_cpu_is_busy()

From: Rafael J. Wysocki
Date: Thu Jun 20 2024 - 14:12:37 EST


Hi Tejun,

On Wed, Jun 19, 2024 at 9:53 PM Tejun Heo <tj@xxxxxxxxxx> wrote:
>
> Hello, Rafael.
>
> On Wed, Jun 19, 2024 at 08:45:42PM +0200, Rafael J. Wysocki wrote:
> > On Wed, Jun 19, 2024 at 5:13 AM Tejun Heo <tj@xxxxxxxxxx> wrote:
> > >
> > > sugov_cpu_is_busy() is used to avoid decreasing performance level while the
> > > CPU is busy and called by sugov_update_single_freq() and
> > > sugov_update_single_perf(). Both callers repeat the same pattern to first
> > > test for uclamp and then the business. Let's refactor so that the tests
> > > aren't repeated.
> > >
> > > The new helper is named sugov_hold_freq() and tests both the uclamp
> > > exception and CPU business. No functional changes. This will make adding
> > > more exception conditions easier.
> > >
> > > Signed-off-by: Tejun Heo <tj@xxxxxxxxxx>
> > > Reviewed-by: David Vernet <dvernet@xxxxxxxx>
> > > Cc: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> > > Cc: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
> >
> > Acked-by: Rafael J. Wysocki <rafael@xxxxxxxxxx>
> >
> > for this particular change.
>
> If the cpufreq_schedutil part of the second patch looks good to you, would
> it be okay to route together with this patch through the sched_ext tree?

Please feel free to pick up the $subject patch (with my ACK).

As for the [2/2], I don't think I'm sufficiently familiar with the
scx_* stuff to make any comments on it, either way.

Cheers, Rafael