The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Waiman Long <llong@redhat.com>
To: Chen Ridong <chenridong@huaweicloud.com>,
	tj@kernel.org, hannes@cmpxchg.org, mkoutny@suse.com
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	lujialin4@huawei.com, chenridong@huawei.com
Subject: Re: [PATCH -next 2/3] cpuset: remove impossible warning in update_parent_effective_cpumask
Date: Mon, 22 Sep 2025 17:37:17 -0400	[thread overview]
Message-ID: <fddfeb3a-2a1e-42be-b2ad-8b6fa5f24f9b@redhat.com> (raw)
In-Reply-To: <20250922130233.3237521-3-chenridong@huaweicloud.com>


On 9/22/25 9:02 AM, Chen Ridong wrote:
> From: Chen Ridong <chenridong@huawei.com>
>
> If the parent is not a valid partition, an error will be returned before
> any partition update command is processed. This means the
> WARN_ON_ONCE(!is_partition_valid(parent)) can never be triggered, so
> it is safe to remove.
>
> Signed-off-by: Chen Ridong <chenridong@huawei.com>
> ---
>   kernel/cgroup/cpuset.c | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 20dface3c3e0..196645b38b24 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -1923,7 +1923,6 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,
>   		 * A partition error happens when parent has tasks and all
>   		 * its effective CPUs will have to be distributed out.
>   		 */
> -		WARN_ON_ONCE(!is_partition_valid(parent));
>   		if (nocpu) {
>   			part_error = PERR_NOCPUS;
>   			if (is_partition_valid(cs))
Acked-by: Waiman Long <longman@redhat.com>


  reply	other threads:[~2025-09-22 21:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 13:02 [PATCH -next 0/3] cpuset: code cleanup and redundancy removal Chen Ridong
2025-09-22 13:02 ` [PATCH -next 1/3] cpuset: remove redundant special case for null input in node mask update Chen Ridong
2025-09-22 21:36   ` Waiman Long
2025-09-22 13:02 ` [PATCH -next 2/3] cpuset: remove impossible warning in update_parent_effective_cpumask Chen Ridong
2025-09-22 21:37   ` Waiman Long [this message]
2025-09-22 13:02 ` [PATCH -next 3/3] cpuset: remove is_prs_invalid helper Chen Ridong
2025-09-22 21:37   ` Waiman Long
2025-09-22 23:10 ` [PATCH 0/3] cpuset: code cleanup and redundancy removal 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=fddfeb3a-2a1e-42be-b2ad-8b6fa5f24f9b@redhat.com \
    --to=llong@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=chenridong@huawei.com \
    --cc=chenridong@huaweicloud.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lujialin4@huawei.com \
    --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