From: Waiman Long <longman@redhat.com>
To: Frederic Weisbecker <frederic@kernel.org>
Cc: "Chen Ridong" <chenridong@huawei.com>,
"Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
"Jon Hunter" <jonathanh@nvidia.com>
Subject: Re: [PATCH] cgroup/cpuset: Call rebuild_sched_domains() directly in hotplug
Date: Thu, 5 Mar 2026 14:27:16 -0500 [thread overview]
Message-ID: <40efb05d-ec68-4677-b0a6-952a26f84553@redhat.com> (raw)
In-Reply-To: <aamLD3MizuWIs8_x@localhost.localdomain>
On 3/5/26 8:54 AM, Frederic Weisbecker wrote:
> Le Wed, Mar 04, 2026 at 01:41:00PM -0500, Waiman Long a écrit :
>> Besides deferring the call to housekeeping_update(), commit 6df415aa46ec
>> ("cgroup/cpuset: Defer housekeeping_update() calls from CPU hotplug
>> to workqueue") also defers the rebuild_sched_domains() call to
>> the workqueue. So a new offline CPU may still be in a sched domain
>> or new online CPU not showing up in the sched domains for a short
>> transition period. That could be a problem in some corner cases and
>> can be the cause of a reported test failure[1]. Fix it by calling
>> rebuild_sched_domains_cpuslocked() directly in hotplug as before. If
>> isolated partition invalidation or recreation is being done, the
>> housekeeping_update() call to update the housekeeping cpumasks will
>> still be deferred to a workqueue.
>>
>> In commit 3bfe47967191 ("cgroup/cpuset: Move
>> housekeeping_update()/rebuild_sched_domains() together"),
>> housekeeping_update() is called before rebuild_sched_domains() because
>> it needs to access the HK_TYPE_DOMAIN housekeeping cpumask. That is now
>> changed to use the static HK_TYPE_DOMAIN_BOOT cpumask as HK_TYPE_DOMAIN
>> cpumask is now changeable at run time. As a result, we can move the
> But rebuild_sched_domains() will still handle the cpuset isolated partitions
> somehow right? Sorry for the question, I'm a bit lost in the
> partition_sched_domains() maze...
For v2, generate_sched_domains() has no dependency on housekeeping
cpumasks other that the HK_TYPE_DOMAIN_BOOT to strip out boot-time
isolated CPUs from the effective_cpus of top_cpuset. So
rebuild_sched_domains() will do the right thing even if HK cpumasks
haven't been fully updated yet. Please let me know if you can think of
any corner cases that will still be problematic.
Cheers, Longman
prev parent reply other threads:[~2026-03-05 19:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 18:41 Waiman Long
2026-03-05 6:45 ` Chen Ridong
2026-03-05 19:16 ` Waiman Long
2026-03-05 13:54 ` Frederic Weisbecker
2026-03-05 19:27 ` Waiman Long [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40efb05d-ec68-4677-b0a6-952a26f84553@redhat.com \
--to=longman@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huawei.com \
--cc=frederic@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®