Re: [PATCH] sched/deadline: Derive root domain from active cpu in task's cpus_ptr

From: Juri Lelli

Date: Mon Oct 06 2025 - 08:12:14 EST


On 06/10/25 12:13, Pierre Gondois wrote:
>
> On 9/30/25 11:04, Peter Zijlstra wrote:
> > On Tue, Sep 30, 2025 at 08:20:06AM +0100, Juri Lelli wrote:
> >
> > > I actually wonder if we shouldn't make cppc_fie a "special" DEADLINE
> > > tasks (like schedutil [1]). IIUC that is how it is thought to behave
> > > already [2], but, since it's missing the SCHED_FLAG_SUGOV flag(/hack),
> > > it is not "transparent" from a bandwidth tracking point of view.
> > >
> > > 1 -https://elixir.bootlin.com/linux/v6.17/source/kernel/sched/cpufreq_schedutil.c#L661
> > > 2 -https://elixir.bootlin.com/linux/v6.17/source/drivers/cpufreq/cppc_cpufreq.c#L198
> > Right, I remember that hack. Bit sad its spreading, but this CPPC thing
> > is very much like the schedutil one, so might as well do that I suppose.
>
> IIUC, the sugov thread was switched to deadline to allow frequency updates
> when deadline tasks start to run. I.e. there should be no point updating the
> freq. after the deadline task finished running, cf [1] and [2]
>
> The CPPC FIE worker should not require to run that quickly as it seems to be
> more like a freq. maintenance work (the call comes from the sched tick)
>
> sched_tick()
> \-arch_scale_freq_tick() / topology_scale_freq_tick()
>   \-set_freq_scale() / cppc_scale_freq_tick()
>     \-irq_work_queue()

OK, but how much bandwidth is enough for it (on different platforms)?
Also, I am not sure the worker follows cpusets/root domain changes.