mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: suhua <suhua.tanke@gmail.com>,
	lizefan.x@bytedance.com, tj@kernel.org, hannes@cmpxchg.org
Cc: cgroups@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cgroup/cpuset: Fix comment in cpuset_hotplug_workfn
Date: Thu, 8 Jun 2023 08:22:06 -0400	[thread overview]
Message-ID: <7ff8c948-c5e2-ac5b-6633-8583b8cb75fe@redhat.com> (raw)
In-Reply-To: <20230608085439.27501-1-suhua.tanke@gmail.com>

On 6/8/23 04:54, suhua wrote:
> "synchronize cpus_allowed to cpu_active_mask"
> -> "synchronize cpu_active_mask to cpus_allowed"
>
> Signed-off-by: suhua <suhua.tanke@gmail.com>
> ---
>   kernel/cgroup/cpuset.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
> index b0aee733b92b..4810d29e2d63 100644
> --- a/kernel/cgroup/cpuset.c
> +++ b/kernel/cgroup/cpuset.c
> @@ -3739,7 +3739,7 @@ static void cpuset_hotplug_workfn(struct work_struct *work)
>   	if (!cpus_updated && top_cpuset.nr_subparts_cpus)
>   		cpus_updated = true;
>   
> -	/* synchronize cpus_allowed to cpu_active_mask */
> +	/* synchronize cpu_active_mask to cpus_allowed */
>   	if (cpus_updated) {
>   		spin_lock_irq(&callback_lock);
>   		if (!on_dfl)

The comment is a bit outdated. The synchronization is only meant for 
cgroup v1, but it is correct in this regard. We are matching 
cpus_allowed of top_cpuset to cpu_active_mask, not the other way around.

Cheers,
Longman


      reply	other threads:[~2023-06-08 12:23 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-08  8:54 suhua
2023-06-08 12:22 ` 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=7ff8c948-c5e2-ac5b-6633-8583b8cb75fe@redhat.com \
    --to=longman@redhat.com \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=suhua.tanke@gmail.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®