From: Waiman Long <longman@redhat.com>
To: "Sun Shaojie" <sunshaojie@kylinos.cn>,
"Chen Ridong" <chenridong@huaweicloud.com>,
"Tejun Heo" <tj@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Michal Koutný" <mkoutny@suse.com>
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
zhangguopeng@kylinos.cn
Subject: Re: [PATCH v2 2/2] cgroup/cpuset: Add test cases for sibling CPU exclusion on partition update
Date: Wed, 27 May 2026 14:08:20 -0400 [thread overview]
Message-ID: <5289760b-a2a7-4043-962f-49582ddc40ed@redhat.com> (raw)
In-Reply-To: <20260527070509.648304-1-sunshaojie@kylinos.cn>
On 5/27/26 3:05 AM, Sun Shaojie wrote:
> When sibling CPU exclusion occurs, a partition's effective_xcpus may be
> a subset of its user_xcpus. The partcmd_update path must use
> effective_xcpus instead of user_xcpus when calculating CPUs to return
> to or request from the parent.
>
> Add two test cases to verify this behavior:
>
> 1) Narrowing cpuset.cpus to only the sibling-excluded CPUs should not
> return CPUs to parent that the partition never actually owned.
>
> 2) Expanding cpuset.cpus after a sibling becomes a member should
> correctly request the additional CPUs from parent.
>
> Co-developed-by: Zhang Guopeng <zhangguopeng@kylinos.cn>
> Signed-off-by: Zhang Guopeng <zhangguopeng@kylinos.cn>
> Signed-off-by: Sun Shaojie <sunshaojie@kylinos.cn>
> ---
> tools/testing/selftests/cgroup/test_cpuset_prs.sh | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> index a56f4153c64d..683b05062810 100755
> --- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> +++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> @@ -492,6 +492,16 @@ REMOTE_TEST_MATRIX=(
> " C1-5:P1 . C1-4:P1 C2-3 . . \
> . . . P1 . . p1:5|c11:1-4|c12:5 \
> p1:P1|c11:P1|c12:P-1"
> + # Narrowing cpuset.cpus to previously sibling-excluded CPUs should
> + # not return CPUs that were never actually owned.
> + " C1-4:P1 . C1-2:P1 C1-3:P2 . . \
> + . . . C3 . . p1:4|c11:1-2|c12:3 \
> + p1:P1|c11:P1|c12:P2 3"
> + # Expanding cpuset.cpus to include a previously sibling-excluded CPU
> + # after the sibling has become a member should correctly request it.
> + " C1-4:P1 . C1-2:P1 C1-3:P2 . . \
> + . . P0 C2-3 . . p1:1,4|c11:1|c12:2-3 \
> + p1:P1|c11:P0|c12:P2 2-3"
> )
>
> #
Reviewed-by: Waiman Long <longman@redhat.com>
next prev parent reply other threads:[~2026-05-27 18:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-27 6:43 [PATCH v2 0/2] cgroup/cpuset: Fix sibling CPU exclusion in partcmd_update Sun Shaojie
2026-05-27 6:43 ` [PATCH v2 1/2] cgroup/cpuset: Use effective_xcpus in partcmd_update add/del mask calculation Sun Shaojie
2026-05-27 7:05 ` [PATCH v2 2/2] cgroup/cpuset: Add test cases for sibling CPU exclusion on partition update Sun Shaojie
2026-05-27 18:08 ` Waiman Long [this message]
2026-05-27 18:01 ` [PATCH v2 1/2] cgroup/cpuset: Use effective_xcpus in partcmd_update add/del mask calculation Waiman Long
2026-05-27 19:05 ` [PATCH v2 0/2] cgroup/cpuset: Fix sibling CPU exclusion in partcmd_update Tejun Heo
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=5289760b-a2a7-4043-962f-49582ddc40ed@redhat.com \
--to=longman@redhat.com \
--cc=cgroups@vger.kernel.org \
--cc=chenridong@huaweicloud.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkoutny@suse.com \
--cc=sunshaojie@kylinos.cn \
--cc=tj@kernel.org \
--cc=zhangguopeng@kylinos.cn \
/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®