From: Ridong Chen <ridong.chen@linux.dev>
To: "Waiman Long" <longman@redhat.com>, "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,
Guopeng Zhang <guopeng.zhang@linux.dev>
Subject: Re: [PATCH-next v2 1/5] selftests/cgroup: Fix "test_cpuset_prs.sh -v" failures
Date: Tue, 10 Nov 2026 15:56:51 +0800 [thread overview]
Message-ID: <6b01f2c6-2cf2-4650-8fdb-821f0222b082@linux.dev> (raw)
In-Reply-To: <20261109190955.1398611-2-longman@redhat.com>
On 11/10/2026 3:09 AM, Waiman Long wrote:
> When the -v option is used to run test_cpuset_prs.sh, it activates the
> use of sched-debug to determine the set of isolated CPUs which will
> also consider 1-CPU partition as being isolated though they will not be
> reflected in "cpuset.cpus.isolated". As a result, some of the expected
> isolated CPUs values have 2 different set of values to correspond to
> these two ways of determining isolated CPUs.
>
> Commit 6e4834ba8986 ("cgroup/cpuset: Fix incorrect CPU accounting with
> parent's effective_xcpus expansion") introduces some new test cases
> which fail when the -v option is used. Update the test cases to make
> them pass with the -v option as well.
>
> Also remove an obsolete comment in update_parent_effective_cpumask()
> of cpuset.c.
>
> Reported-by: Tejun Heo <tj@kernel.org>
> Link: https://lore.kernel.org/lkml/886a562b52b1c5094142d547a8336457@kernel.org
> Fixes: 362212853cd0 ("cgroup/cpuset: Fix incorrect CPU accounting with parent's effective_xcpus expansion")
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
> kernel/cgroup/cpuset.c | 6 ------
> tools/testing/selftests/cgroup/test_cpuset_prs.sh | 13 ++++++++-----
> 2 files changed, 8 insertions(+), 11 deletions(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 85e5b529d144..6074327c3477 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -2164,12 +2164,6 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,
> else
> part_error = PERR_NOTEXCL;
> }
> - /*
> - * When both cs and parent remain valid, parent's
> - * compute_partition_effective_cpumask() call would have removed
> - * cs's effective_xcpus from the parent's effective_cpus. So
> - * there is no need to adjust parent's effective_cpus here.
> - */
> }
>
> write_error:
> diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> index 32e1e44fa0b1..2d4744f2d6ac 100755
> --- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> +++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> @@ -540,16 +540,19 @@ TEST_MATRIX=(
>
> # The extra CPUs gained by a child partition when its parent expands the
> # exclusive CPUs have to be taken away from the parent.
> - " C2-6:X2-5:P1 CX3-6:P1 \
> - . . X2-6 . . . 0 A1:2|A2:3-6|XA2:3-6 A1:P1|A2:P1 ."
> - " C2-6:X2-5:P1 CX3-6:P2 \
> - . . X2-6 . . . 0 A1:2|A2:3-6|XA2:3-6 A1:P1|A2:P2 3-6"
> + " C2-6:X2-5:P1 CX4-6:P1 \
> + . . X2-6 . . . 0 A1:2-3|A2:4-6|XA2:4-6 \
> + A1:P1|A2:P1 ."
> + " C2-6:X2-5:P1 CX4-6:P2 \
> + . . X2-6 . . . 0 A1:2-3|A2:4-6|XA2:4-6 \
> + A1:P1|A2:P2 4-6"
>
> # Both expansion and contraction of parent's effective_xcpus will be
> # correctly handled in child partition and the child can be invalidated
> # if a populated parent could lose all its effective_cpus.
> " C2-6:X2-5:P1 CX3,5-6:P2 \
> - . . X4-6 . . . 0 A1:4|A2:5-6|XA2:5-6 A1:P1|A2:P2 5-6"
> + . . X4-6 . . . 0 A1:4|A2:5-6|XA2:5-6 \
> + A1:P1|A2:P2 4-6|5-6"
> " C2-6:X2-5:P1 CX3-6:P2 \
> . . T:X4-6 . . . 0 A1:4-6|A2:4-6 A1:P1|A2:P-2 ."
>
The commit message still refers to commit 6e4834ba8986, which isn't in
next tree. It should be 362212853cd0 ?
I applied the whole series on top of next-20261109 and ran
test_cpuset_prs.sh with and without -v as well as test_cpuset on an
8-CPU VM. All tests passed and there is no warning in dmesg.
Reviewed-by: Ridong Chen <ridong.chen@linux.dev>
Tested-by: Ridong Chen <ridong.chen@linux.dev>
--
Best regards
Ridong
next prev parent reply other threads:[~2026-11-10 7:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 19:09 [PATCH-next v2 0/5] More fix patches Waiman Long
2026-11-09 19:09 ` [PATCH-next v2 1/5] selftests/cgroup: Fix "test_cpuset_prs.sh -v" failures Waiman Long
2026-11-10 7:56 ` Ridong Chen [this message]
2026-11-09 19:09 ` [PATCH-next v2 2/5] cgroup/cpuset: Correctly set cpus_updated in cpuset_hotplug_update_tasks() Waiman Long
2026-11-10 8:40 ` Ridong Chen
2026-11-11 2:01 ` Waiman Long
2026-11-09 19:09 ` [PATCH-next v2 3/5] cgroup/cpuset: Fix incorrect partition invalidation logic " Waiman Long
2026-11-10 8:51 ` Ridong Chen
2026-11-09 19:09 ` [PATCH-next v2 4/5] cgroup/cpuset: Protect current->mems_allowed read in cpuset_fork() Waiman Long
2026-11-10 11:24 ` Ridong Chen
2026-11-09 19:09 ` [PATCH-next v2 5/5] cgroup/cpuset: Correctly set isolated_cpus when switching partition state Waiman Long
2026-11-10 2:23 ` Waiman Long
2026-11-10 2:24 ` [PATCH-next v2.1 " Waiman Long
2026-11-10 11:40 ` [PATCH-next v2 " Ridong Chen
2026-11-10 13:02 ` Ridong Chen
2026-11-10 19:27 ` [PATCH-next v2 0/5] More fix patches 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=6b01f2c6-2cf2-4650-8fdb-821f0222b082@linux.dev \
--to=ridong.chen@linux.dev \
--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=longman@redhat.com \
--cc=mkoutny@suse.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.