[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAF+s44Q0AuLbzcWVMt+Qr_M2RJ1COuoi0ZE76tQJsvzksb81Tw@mail.gmail.com>
Date: Fri, 14 Nov 2025 19:28:02 +0800
From: Pingfan Liu <piliu@...hat.com>
To: Waiman Long <llong@...hat.com>
Cc: Juri Lelli <juri.lelli@...hat.com>, linux-kernel@...r.kernel.org,
Chen Ridong <chenridong@...weicloud.com>, Peter Zijlstra <peterz@...radead.org>,
Pierre Gondois <pierre.gondois@....com>, Ingo Molnar <mingo@...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: [PATCHv5] sched/deadline: Walk up cpuset hierarchy to decide root
domain when hot-unplug
On Wed, Nov 12, 2025 at 12:18 PM Waiman Long <llong@...hat.com> wrote:
>
> On 11/11/25 8:23 AM, Juri Lelli wrote:
>
> On 11/11/25 19:40, Pingfan Liu wrote:
>
> Hi Juri,
>
> Thanks for your review. Please see the comments below.
>
> ...
>
> Since there's no way to handle memory allocation failures, could it be
> done by using alloc_cpumask_var() in init_sched_dl_class() to reserve
> the memory for this purpose?
>
> Maybe something similar to local_cpu_mask_dl (or use local_cpu_mask_dl
> directly?), I'm thinking.
>
> local_cpu_mask_dl is used in find_later_rq() which is called by select_task_rq_dl() and find_lock_later_rq(). The scheduler core will call these class methods after acquiring a pi_lock with interrupt disabled. It is the interrupt disabled part that protects that percpu cpumask. Since dl_get_task_effective_cpus() is also called after acquiring the pi_lock with interrupt disabled, we can use it as a temporary cpumask_var_t.
>
Thanks Juri and Waiman, I will use this approach to resolve the
cpumask allocation issue.
As for the spin_lock issue (sleepable on RT under pi_lock), I'll use a
lock-free variant of cpuset_cpus_allowed().
Thanks,
Pingfan
Powered by blists - more mailing lists