Re: [PATCH 1/5] cpuidle: Remove pointless stub

From: Rafael J. Wysocki
Date: Thu Nov 05 2020 - 09:14:39 EST


On Fri, Oct 16, 2020 at 10:31 PM Daniel Lezcano
<daniel.lezcano@xxxxxxxxxx> wrote:
>
>
> Hi Rafael,
>
> On 16/10/2020 17:24, Rafael J. Wysocki wrote:
> > On Thu, Oct 15, 2020 at 4:44 PM Daniel Lezcano
> > <daniel.lezcano@xxxxxxxxxx> wrote:
> >>
> >> The cpuidle.h header is declaring functions with an empty stub when
> >> cpuidle is not enabled. However these functions are only called from
> >> the governors which depends on cpuidle. In other words, when the
> >> function is called it is when cpuidle is enabled, there is no
> >> situation when it is called with cpuidle disabled.
> >>
> >> Remove the pointless stub.
> >>
> >> Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
> >> ---
>
> [ ... ]
>
> > Applied (this patch alone) as 5.10-rc material with some minor edits
> > in the changelog, thanks!
>
> Does it mean you disagree the other patches? Or are you waiting for more
> comments?

Actually, both.

My primary concern regarding the modularization of cpuidle governors
is that they really belong to the core kernel. They access the
internals thereof and the behavior of the idle loop in general depends
on what they do.

OTOH IMV a potential benefit resulting from allowing them to be
modular is very small, at least from the mainline perspective.

IOW this case is very similar to the modularization of the schedutil
cpufreq governor which we decided not to do for similar reasons.