From: Waiman Long <longman@redhat.com>
To: "Guopeng Zhang" <guopeng.zhang@linux.dev>,
"Ridong Chen" <ridong.chen@linux.dev>,
"Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>,
"Shuah Khan" <shuah@kernel.org>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: Re: [PATCH-next 1/6] cgroup/cpuset: Find furthest isolated ancestor for invalidated isolated partition
Date: Thu, 22 Oct 2026 12:19:38 -0400 [thread overview]
Message-ID: <ac570c76-5677-4058-94c0-2eb9540526eb@redhat.com> (raw)
In-Reply-To: <f22f4cdf-eebe-437a-8b3a-5f98aa0df5a8@linux.dev>
On 10/22/26 9:25 AM, Guopeng Zhang wrote:
>
> 在 2026/10/22 11:16, Waiman Long 写道:
>> Commit 46b885416c27 ("cgroup/cpuset: Fix a missing isolated_cpus
>> update in update_cpumasks_hier()") searches for the closet partition
>> root ancestor to determine if the isolated CPUs in a to be invalidated
>> isolation partition should be removed from isolated_cpus or not.
>>
>> As reported by sashiko, this method may not work when there is a deeply
>> nested isolated partition hierarchy. For instance, Consider a nested
>> hierarchy A0 -> A1 -> A2 -> A3 where all four are PRS_ISOLATED:
>>
>> A0: effective_xcpus = 0-4
>> A1: effective_xcpus = 1-4
>> A2: effective_xcpus = 2-4
>> A3: effective_xcpus = 3-4
>>
>> When A1 shrinks its exclusive_cpus from 1-4 to 1-2, A2 will update it
>> effective_xcpus to 2. A3 will find its closet partition root ancestor
>> A2 and decides that its effective_xcpus 3-4 should be removed from
>> isolated_cpus which is incorrect.
>>
>> Address this corner case by searching for the furthest isolated partition
>> root ancestor instead to decide if its isolated CPUs should be returned
>> to isolated_cpus.
>>
> This looks good to me. Would it be worth adding a test case for the
> scenario described above, something like:
>
> # A middle isolated parent shrunk below coverage: the released
> # CPUs of the invalidated child stay isolated as a higher
> # ancestor still covers them.
> " CX0-4:P2 CX2-4:P2 CX3-4:P2 . . X2 . . 0 A1:0-1,3-4|A2:2|A3:2 A1:P2|A2:P2|A3:P-2 0-4"
>
> Reviewed-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
> Tested-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
>
> Thanks,
> Guopeng
Thanks for the review. This patch fixes a specific problem reported by
sashiko. However, there are other pre-existing problem that will still
fail test case that you have proposed above. Patches 2 & 3 of this
series are there to address the other existing problems so that test
cases like what you have proposed above will work. The first test case
added in patch 2 was to test this though it is somewhat different from
yours. I don't add any test case to patch 1 because I don't want to
break bisection. I can add your test case in patch 2 though.
Cheers,
Longman
next prev parent reply other threads:[~2026-10-22 16:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-22 3:16 [PATCH-next 0/6] cgroup/cpuset: Miscellaneous bug fixes Waiman Long
2026-10-22 3:16 ` [PATCH-next 1/6] cgroup/cpuset: Find furthest isolated ancestor for invalidated isolated partition Waiman Long
2026-10-22 13:25 ` Guopeng Zhang
2026-10-22 16:19 ` Waiman Long [this message]
2026-10-22 3:16 ` [PATCH-next 2/6] cgroup/cpuset: Properly compute effective xcpus in update_parent_effective_cpumask() Waiman Long
2026-10-22 13:45 ` Guopeng Zhang
2026-10-22 14:47 ` Waiman Long
2026-10-22 15:00 ` Waiman Long
2026-10-22 3:16 ` [PATCH-next 3/6] cgroup/cpuset: Fix incorrect effective_cpus bug in update_cpumasks_hier() Waiman Long
2026-10-22 3:16 ` [PATCH-next 4/6] cgroup/cpuset: Minor fixes to prstate_housekeeping_conflict() Waiman Long
2026-10-22 14:15 ` Guopeng Zhang
2026-10-22 14:35 ` Waiman Long
2026-10-22 3:16 ` [PATCH-next 5/6] selftests/cgroup: Check for a single range nohz_full CPUs before running test matrix Waiman Long
2026-10-22 14:09 ` Guopeng Zhang
2026-10-22 3:16 ` [PATCH-next 6/6] cgroup/cpuset: Prevent recursive call of remote_cpus_update() via update_cpumasks_hier() Waiman Long
2026-10-22 14:23 ` Guopeng Zhang
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=ac570c76-5677-4058-94c0-2eb9540526eb@redhat.com \
--to=longman@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=guopeng.zhang@linux.dev \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=ridong.chen@linux.dev \
--cc=shuah@kernel.org \
--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®