Re: [PATCH v2 3/2] sched/deadline: Check bandwidth overflow earlier for hotplug

Juri Lelli
2025-02-24T14:03:28Z

On 24/02/25 14:53, Dietmar Eggemann wrote:
> On 21/02/2025 15:45, Dietmar Eggemann wrote:
> > On 21/02/2025 12:56, Jon Hunter wrote:
> >>
> >> On 20/02/2025 15:25, Juri Lelli wrote:
> >>> On 20/02/25 11:40, Juri Lelli wrote:
> >>>> On 19/02/25 19:14, Dietmar Eggemann wrote:
> >
> > [...]
> >
> >> Latest branch is not building for me ...
> >>
> >>   CC      kernel/time/hrtimer.o
> >> In file included from kernel/sched/build_utility.c:88:
> >> kernel/sched/topology.c: In function ‘partition_sched_domains’:
> >> kernel/sched/topology.c:2817:9: error: implicit declaration of function
> >> ‘dl_rebuild_rd_accounting’ [-Werror=implicit-function-declaration]
> >>  2817 |         dl_rebuild_rd_accounting();
> >>       |         ^~~~~~~~~~~~~~~~~~~~~~~~
> >
> > This should fix it for now:
> >
> > -->8--
> >
> > diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> > index 52243dcc61ab..3484dda93a94 100644
> > --- a/kernel/cgroup/cpuset.c
> > +++ b/kernel/cgroup/cpuset.c
> > @@ -954,7 +954,9 @@ static void dl_update_tasks_root_domain(struct cpuset *cs)
> > css_task_iter_end(&it);
> > }
> >
> > -static void dl_rebuild_rd_accounting(void)
> > +extern void dl_rebuild_rd_accounting(void);
> > +
> > +void dl_rebuild_rd_accounting(void)
> > {
> > struct cpuset *cs = NULL;
> > struct cgroup_subsys_state *pos_css;
> > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> > index 9892e6fa3e57..60c9996ccf47 100644
> > --- a/kernel/sched/topology.c
> > +++ b/kernel/sched/topology.c
> > @@ -2806,6 +2806,8 @@ void partition_sched_domains_locked(int ndoms_new, cpumask_var_t doms_new[],
> > update_sched_domain_debugfs();
> > }
> >
> > +extern void dl_rebuild_rd_accounting(void);
> > +
> > /*
> > * Call with hotplug lock held
> > */
> >
> >
>
> Looks OK now for me.
>
> So DL accounting in partition_and_rebuild_sched_domains() and
> partition_sched_domains()!

Yeah that's the gist of it. Wait for domains to be stable and recompute
everything.

Thanks for testing. Let's see if Jon can also report good news.

Best,
Juri