mirror of https://lore.kernel.org/lkml/
 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 cgroup/for-next 2/2] cpuset: Use new excpus for nocpu error check when enabling root partition
Date: Thu, 18 Sep 2025 14:10:36 -0400	[thread overview]
Message-ID: <ea6c57fa-4e44-45ad-9219-09bc60acea26@redhat.com> (raw)
In-Reply-To: <20250918122532.2981503-3-chenridong@huaweicloud.com>


On 9/18/25 8:25 AM, Chen Ridong wrote:
> From: Chen Ridong <chenridong@huawei.com>
>
> A previous patch fixed a bug where new_prs should be assigned before
> checking housekeeping conflicts. This patch addresses another potential
> issue: the nocpu error check currently uses the xcpus which is not updated.
> Although no issue has been observed so far, the check should be performed
> using the new effective exclusive cpus.
>
> The comment has been removed because the function returns an error if
> nocpu checking fails, which is unrelated to the parent.
>
> Signed-off-by: Chen Ridong <chenridong@huawei.com>
> ---
>   kernel/cgroup/cpuset.c | 6 +-----
>   1 file changed, 1 insertion(+), 5 deletions(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index 2b7e2f17577e..44d65890326a 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -1818,11 +1818,7 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,
>   		if (prstate_housekeeping_conflict(new_prs, xcpus))
>   			return PERR_HKEEPING;
>   
> -		/*
> -		 * A parent can be left with no CPU as long as there is no
> -		 * task directly associated with the parent partition.
> -		 */
> -		if (nocpu)
> +		if (tasks_nocpu_error(parent, cs, xcpus))
>   			return PERR_NOCPUS;
>   
>   		/*
Reviewed-by:  Waiman Long <longman@redhat.com>


      reply	other threads:[~2025-09-18 18:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18 12:25 [PATCH cgroup/for-next 0/2] cpuset: fix failure to enable isolated partition when containing isolcpus Chen Ridong
2025-09-18 12:25 ` [PATCH cgroup/for-next 1/2] " Chen Ridong
2025-09-18 18:02   ` Waiman Long
2025-09-19  0:58     ` Chen Ridong
2025-09-18 12:25 ` [PATCH cgroup/for-next 2/2] cpuset: Use new excpus for nocpu error check when enabling root partition Chen Ridong
2025-09-18 18:10   ` Waiman Long [this message]

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=ea6c57fa-4e44-45ad-9219-09bc60acea26@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

all inboxes | Powered by JetHome®