mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guopeng Zhang <guopeng.zhang@linux.dev>
To: "Waiman Long" <longman@redhat.com>,
	"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 5/6] selftests/cgroup: Check for a single range nohz_full CPUs before running test matrix
Date: Thu, 22 Oct 2026 22:09:23 +0800	[thread overview]
Message-ID: <553cb756-de36-4015-ad13-0c260dec675e@linux.dev> (raw)
In-Reply-To: <20261022031643.1351877-6-longman@redhat.com>



在 2026/10/22 11:16, Waiman Long 写道:
> Commit 989ca25c10ca ("selftests/cgroup: Add tests for nohz_full
> housekeeping check") adds a nohz_full test matrix that will only be run
> when a nohz_full boot parameter cover all the CPUs beyond CPUs 0-7. The
> code looks for the first and last CPU numbers in the nohz_full sysfs
> file to determine if that criterion is met. However if there are holes in
> the range (i.e. has ",") the test matrix may be incorrectly run leading
> to unexpected test failure. Fix that by skipping "," and anything after
> that to make sure the first range will cover all the remaining CPUs.
> 
> Fixes: 989ca25c10ca ("selftests/cgroup: Add tests for nohz_full housekeeping check")
> Signed-off-by: Waiman Long <longman@redhat.com>
> ---
>  tools/testing/selftests/cgroup/test_cpuset_prs.sh | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/tools/testing/selftests/cgroup/test_cpuset_prs.sh b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> index 8595b6b4b7bf..5bc144836bdf 100755
> --- a/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> +++ b/tools/testing/selftests/cgroup/test_cpuset_prs.sh
> @@ -111,9 +111,9 @@ echo "" > test/cpuset.cpus
>  #
>  # If nohz_full CPUs have been reserved at boot time, they should not include
>  # CPUs 0-7 as that may fail some of the test cases. On the other hand if the
> -# set of nohz_full CPUs includes all the CPUs except 0-7, we can run a special
> -# set of housekeeping CPUs exhaustion tests to see if the cpuset code will
> -# reject them.
> +# set of nohz_full CPUs includes all the CPUs except 0-7 in a single range
> +# <first>-<last>, we can run a special set of housekeeping CPUs exhaustion
> +# tests to see if the cpuset code will reject them.
>  #
>  FIRST_NOHZ_FULL_CPU=
>  LAST_NOHZ_FULL_CPU=
> @@ -124,7 +124,7 @@ NOHZ_FULL_CPUS=
>  LAST_PRESENT_CPU=$(cat /sys/devices/system/cpu/present | sed -e "s/.*[,-]//")
>  [[ -n "$NOHZ_FULL_CPUS" ]] && {
>  	FIRST_NOHZ_FULL_CPU=$(echo $NOHZ_FULL_CPUS | sed -e "s/[,-].*//")
> -	LAST_NOHZ_FULL_CPU=$(echo $NOHZ_FULL_CPUS | sed -e "s/.*[,-]//")
> +	LAST_NOHZ_FULL_CPU=$(echo $NOHZ_FULL_CPUS | sed -e "s/,.*//;s/.*[-]//")
>  	echo "Boot nohz_full CPUs: $NOHZ_FULL_CPUS"
>  }
>  [[ -n "$FIRST_NOHZ_FULL_CPU" && "$FIRST_NOHZ_FULL_CPU" -le 7 ]] &&

Reviewed-by: Guopeng Zhang <zhangguopeng@kylinos.cn>
Tested-by: Guopeng Zhang <zhangguopeng@kylinos.cn>

  reply	other threads:[~2026-10-22 14:09 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
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 [this message]
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=553cb756-de36-4015-ad13-0c260dec675e@linux.dev \
    --to=guopeng.zhang@linux.dev \
    --cc=cgroups@vger.kernel.org \
    --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=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®