linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cgroup/cpuset: Fix comment in cpuset_hotplug_workfn
@ 2023-06-08  8:54 suhua
  2023-06-08 12:22 ` Waiman Long
  0 siblings, 1 reply; 2+ messages in thread
From: suhua @ 2023-06-08  8:54 UTC (permalink / raw)
  To: longman, lizefan.x, tj, hannes; +Cc: cgroups, linux-kernel, suhua.tanke

"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)
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cgroup/cpuset: Fix comment in cpuset_hotplug_workfn
  2023-06-08  8:54 [PATCH] cgroup/cpuset: Fix comment in cpuset_hotplug_workfn suhua
@ 2023-06-08 12:22 ` Waiman Long
  0 siblings, 0 replies; 2+ messages in thread
From: Waiman Long @ 2023-06-08 12:22 UTC (permalink / raw)
  To: suhua, lizefan.x, tj, hannes; +Cc: cgroups, linux-kernel

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-08 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-08  8:54 [PATCH] cgroup/cpuset: Fix comment in cpuset_hotplug_workfn suhua
2023-06-08 12:22 ` Waiman Long

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).