[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF+s44RVjwL7G8Lw+bcKdu+MbXtgpue6t_+5XuoQE7ys2oRs1w@mail.gmail.com>
Date: Wed, 1 Oct 2025 21:15:18 +0800
From: Pingfan Liu <piliu@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
Juri Lelli <juri.lelli@...hat.com>, Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>, Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>, Mel Gorman <mgorman@...e.de>,
Valentin Schneider <vschneid@...hat.com>
Subject: Re: [PATCH] sched/deadline: Derive root domain from active cpu in
task's cpus_ptr
f
On Tue, Sep 30, 2025 at 5:03 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> On Tue, Sep 30, 2025 at 09:47:33AM +0800, Pingfan Liu wrote:
>
> > > > This patch uses the rd from the run queue of still-active CPU to get the
> > > > correct root domain.
> > >
> >
> > Sorry that I haven't explained it clearly. I mean the still-active CPU
> > in task->cpus_ptr,
> >
> > > That doesn't seem right in general. What if there are multiple root
> > > domains; how does it know which to use?
> > >
> >
> > In the case of task->cpus_ptr, there should be only one root domain, right?
>
> IIRC there was a corner case somewhere; something like clearing the old
> cpuset load_balance flag on the root domain would not iterate all tasks
> or so.
>
According to the current implementation, root_domain is the toppest
cpuset, except top_cpuset, with load_balance flag. So at the top
level, it should be several disjoint CPU sets. If a top level cpuset's
load_balance flag is cleared, the rebuilt root domain which covers
this cpuset's CPU should be the one corresponding to top_cpuset. If
this is true, I think there is always one root domain.
> The result would be tasks with all-set cpumasks (the default value)
> spread over multiple root domains. Every task would be caught in
> whatever root domain it was at the time of toggle.
>
If the above is true, the tasks will have top_cpuset's
root_domain->span in cpus_ptr. And this corner case will be avoided.
Does that make sense?
Thanks,
Pingfan
Powered by blists - more mailing lists