Re: [RFC PATCH 0/1] sched/pelt: Change PELT halflife at runtime

From: Peter Zijlstra
Date: Wed Nov 09 2022 - 10:49:55 EST


On Tue, Nov 08, 2022 at 07:48:43PM +0000, Qais Yousef wrote:
> On 11/07/22 14:41, Peter Zijlstra wrote:
> > On Thu, Sep 29, 2022 at 03:41:47PM +0100, Kajetan Puchalski wrote:
> >
> > > Based on all the tests we've seen, jankbench or otherwise, the
> > > improvement can mainly be attributed to the faster ramp up of frequency
> > > caused by the shorter PELT window while using schedutil.
> >
> > Would something terrible like the below help some?
> >
> > If not, I suppose it could be modified to take the current state as
> > history. But basically it runs a faster pelt sum along side the regular
> > signal just for ramping up the frequency.
>
> A bit of a tangent, but this reminded me of this old patch:
>
> https://lore.kernel.org/lkml/1623855954-6970-1-git-send-email-yt.chang@xxxxxxxxxxxx/
>
> I think we have a bit too many moving cogs that might be creating undesired
> compound effect.
>
> Should we consider removing margins in favour of improving util ramp up/down?
> (whether via util_est or pelt hf).

Yeah, possibly.

So one thing that was key to that hack I proposed is that it is
per-task. This means we can either set or detect the task activation
period and use that to select an appropriate PELT multiplier.

But please explain; once tasks are in a steady state (60HZ, 90HZ or god
forbit higher), the utilization should be the same between the various
PELT window sizes, provided the activation period isn't *much* larger
than the window.

Are these things running a ton of single shot tasks or something daft
like that?