Skip to contentSkip to conversation

cgroup/cpuset: Don't filter offline CPUs in cpuset_cpus_allowed() for top cpuset tasks

PATCH Superseded Waiman Long 4 participants 9 messages Feb 3, 2023 – Feb 7, 2023

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Waiman Long

author maintainer
#0 lore raw

PATCH 1/1 cgroup/cpuset: Don't filter offline CPUs in cpuset_cpus_allowed() for top cpuset tasks

Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed.

One way to reproduce this as suggested by Peter is:
- boot machine
- offline all CPUs except one
- taskset -p ffffffff $$
- online all CPUs

Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly.

Fixes 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask")

Originally-from: Peter Zijlstra (Intel) <[email protected]>

---
 kernel/cgroup/cpuset.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)
kernel/cgroup/cpuset.c +25 -2
index 207bafdb05e8..11554e5845f7 100644
@@ -3707,15 +3707,38 @@ void __init cpuset_init_smp(void)
  * Description: Returns the cpumask_var_t cpus_allowed of the cpuset
  * attached to the specified @tsk.  Guaranteed to return some non-empty
  * subset of cpu_online_mask, even if this means going outside the
- * tasks cpuset.
+ * tasks cpuset, except when the task is in the top cpuset.
  **/
 
 void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
 {
 	unsigned long flags;
+	struct cpuset *cs;
 
 	spin_lock_irqsave(&callback_lock, flags);
-	guarantee_online_cpus(tsk, pmask);
+	rcu_read_lock();
+
+	cs = task_cs(tsk);
+	if (cs != &top_cpuset)
+		guarantee_online_cpus(tsk, pmask);
+	/*
+	 * TODO: Tasks in the top cpuset won't get update to their cpumasks
+	 * when a hotplug online/offline event happens. So we include all
+	 * offline cpus in the allowed cpu list.
+	 */
+	if ((cs == &top_cpuset) || cpumask_empty(pmask)) {
+		const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
+
+		/*
+		 * We first exclude cpus allocated to partitions. If there is no
+		 * allowable online cpu left, we fall back to all possible cpus.
+		 */
+		cpumask_andnot(pmask, possible_mask, top_cpuset.subparts_cpus);
+		if (!cpumask_intersects(pmask, cpu_online_mask))
+			cpumask_copy(pmask, possible_mask);
+	}
+
+	rcu_read_unlock();
 	spin_unlock_irqrestore(&callback_lock, flags);
 }
 
Signature · 1 line
2.31.1
maintainer
#1 lore raw
Quoted 20 lines · Waiman Long

Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed.

One way to reproduce this as suggested by Peter is:
- boot machine
- offline all CPUs except one
- taskset -p ffffffff $$
- online all CPUs

Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly.

Quoted 4 lines
Fixes 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask")

Originally-from: Peter Zijlstra (Intel) <[email protected]>

So, this is the replacement for the first patch[1] Will posted, right?

Quoted 15 lines

void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask) {

kernel/cgroup/cpuset.c +9 -1
 	unsigned long flags;
+	struct cpuset *cs;
 
 	spin_lock_irqsave(&callback_lock, flags);
-	guarantee_online_cpus(tsk, pmask);
+	rcu_read_lock();
+
+	cs = task_cs(tsk);
+	if (cs != &top_cpuset)
+		guarantee_online_cpus(tsk, pmask);
+	/*
+	 * TODO: Tasks in the top cpuset won't get update to their cpumasks
+	 * when a hotplug online/offline event happens. So we include all

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3736

Quoted 10 lines
kernel/cgroup/cpuset.c +10 -0
+	 * offline cpus in the allowed cpu list.
+	 */
+	if ((cs == &top_cpuset) || cpumask_empty(pmask)) {
+		const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
+
+		/*
+		 * We first exclude cpus allocated to partitions. If there is no
+		 * allowable online cpu left, we fall back to all possible cpus.
+		 */
+		cpumask_andnot(pmask, possible_mask, top_cpuset.subparts_cpus);

and the differences are that

* It's only applied to the root cgroup.

* Cpus taken up by partitions are excluded.

Is my understanding correct?

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3742

Quoted 6 lines
kernel/cgroup/cpuset.c +5 -0
+		if (!cpumask_intersects(pmask, cpu_online_mask))
+			cpumask_copy(pmask, possible_mask);
+	}
+
+	rcu_read_unlock();
 	spin_unlock_irqrestore(&callback_lock, flags);

So, I suppose you're suggesting applying this patch instead of the one Will Deacon posted[1] and we need Will's second patch[2] on top, right?

[1] http://lkml.kernel.org/r/20230131221719.3176-3-will-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
[2] http://lkml.kernel.org/r/20230131221719.3176-3-will-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

Thanks.

Signature · 1 line
tejun
author maintainer
#2 lore raw
Quoted 21 lines · Tejun Heo
Quoted 20 lines · Waiman Long

Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed.

One way to reproduce this as suggested by Peter is:
- boot machine
- offline all CPUs except one
- taskset -p ffffffff $$
- online all CPUs

Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly.

Quoted 5 lines
Quoted 4 lines
Fixes 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask")

Originally-from: Peter Zijlstra (Intel) <[email protected]>

So, this is the replacement for the first patch[1] Will posted, right?

Yes, if Will and Peter has no objection. I think it is less risky and handle the partition case better.

With v1, Will's patch should get similar result as the existing guarantee_online_cpus() function since we can infer offline cpus from cpus_allowed. With v2, it does include offline cpus correctly, I believe, as long as no partition is enabled. However, the hotplug code is able to update the cpumasks when a CPU is onlined. So the presence of offline CPUs is nice to have, but not essential.

Quoted 28 lines
Quoted 16 lines
  void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
  {
  	unsigned long flags;
kernel/cgroup/cpuset.c +9 -1
+	struct cpuset *cs;
 
  	spin_lock_irqsave(&callback_lock, flags);
-	guarantee_online_cpus(tsk, pmask);
+	rcu_read_lock();
+
+	cs = task_cs(tsk);
+	if (cs != &top_cpuset)
+		guarantee_online_cpus(tsk, pmask);
+	/*
+	 * TODO: Tasks in the top cpuset won't get update to their cpumasks
+	 * when a hotplug online/offline event happens. So we include all

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3736

Quoted 10 lines
kernel/cgroup/cpuset.c +10 -0
+	 * offline cpus in the allowed cpu list.
+	 */
+	if ((cs == &top_cpuset) || cpumask_empty(pmask)) {
+		const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
+
+		/*
+		 * We first exclude cpus allocated to partitions. If there is no
+		 * allowable online cpu left, we fall back to all possible cpus.
+		 */
+		cpumask_andnot(pmask, possible_mask, top_cpuset.subparts_cpus);

and the differences are that

Quoted 5 lines

* It's only applied to the root cgroup.

* Cpus taken up by partitions are excluded.

Is my understanding correct?

Yes, that is correct.

Quoted 9 lines

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3742

Quoted 7 lines
kernel/cgroup/cpuset.c +5 -0
+		if (!cpumask_intersects(pmask, cpu_online_mask))
+			cpumask_copy(pmask, possible_mask);
+	}
+
+	rcu_read_unlock();
  	spin_unlock_irqrestore(&callback_lock, flags);

So, I suppose you're suggesting applying this patch instead of the one Will Deacon posted[1] and we need Will's second patch[2] on top, right?

Right. Let hear if Will and Peter agree with this plan. I have tested this patch and it passed Peter's reproducer test correctly. During testing, I uncovered another bug in the cpu affinity code which results in a separate scheduler patch to fix it.

Quoted 5 lines

[1] http://lkml.kernel.org/r/[email protected]
[2] http://lkml.kernel.org/r/[email protected]

Thanks.

Cheers,
Longman

#4 lore raw
In reply to Waiman Long
Quoted 14 lines · Waiman Long

Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed.

One way to reproduce this as suggested by Peter is:
- boot machine
- offline all CPUs except one
- taskset -p ffffffff $$
- online all CPUs

Quoted 5 lines

Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly.

So you get the task_cpu_possible_mask() interaction vs cpusets horribly wrong here, but given the very sorry state of task_cpu_possible_mask() correctness of cpuset as a whole that might just not matter at this point.

I do very much hate how you add exceptions on exceptions instead of looking to do something right :-(

Fixing that parition case in my patch is 1 extra line and then I think it fundamentally does the right thing and can serve as a basis for fixing cpuset as a whole.

Quoted 27 lines
Fixes 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask")

Originally-from: Peter Zijlstra (Intel) <[email protected]>

---
 kernel/cgroup/cpuset.c | 27 +++++++++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)
kernel/cgroup/cpuset.c +2 -2
index 207bafdb05e8..11554e5845f7 100644
@@ -3707,15 +3707,38 @@ void __init cpuset_init_smp(void)
  * Description: Returns the cpumask_var_t cpus_allowed of the cpuset
  * attached to the specified @tsk.  Guaranteed to return some non-empty
  * subset of cpu_online_mask, even if this means going outside the
- * tasks cpuset.
+ * tasks cpuset, except when the task is in the top cpuset.
  **/
 
 void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
 {
 	unsigned long flags;
+	struct cpuset *cs;
 
 	spin_lock_irqsave(&callback_lock, flags);
-	guarantee_online_cpus(tsk, pmask);

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3728

Quoted 10 lines
kernel/cgroup/cpuset.c +10 -0
+	rcu_read_lock();
+
+	cs = task_cs(tsk);
+	if (cs != &top_cpuset)
+		guarantee_online_cpus(tsk, pmask);
+	/*
+	 * TODO: Tasks in the top cpuset won't get update to their cpumasks
+	 * when a hotplug online/offline event happens. So we include all
+	 * offline cpus in the allowed cpu list.
+	 */

I don't like TODO there, I really don't think CPUSET should update root tasks, that means yet another fundamental difference between CPUSET={y,n}.

Quoted 5 lines
kernel/cgroup/cpuset.c +5 -0
+	if ((cs == &top_cpuset) || cpumask_empty(pmask)) {
+		const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
+
+		/*
+		 * We first exclude cpus allocated to partitions. If there is no

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3743

Quoted 10 lines
kernel/cgroup/cpuset.c +8 -0
+		 * allowable online cpu left, we fall back to all possible cpus.
+		 */
+		cpumask_andnot(pmask, possible_mask, top_cpuset.subparts_cpus);
+		if (!cpumask_intersects(pmask, cpu_online_mask))
+			cpumask_copy(pmask, possible_mask);
+	}
+
+	rcu_read_unlock();
 	spin_unlock_irqrestore(&callback_lock, flags);
 }

I really detest this patch, but if you insist it might just do :-/

Tested-by
#3 lore raw
In reply to Tejun Heo
Quoted 72 lines · Tejun Heo
Quoted 20 lines · Waiman Long

Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed.

One way to reproduce this as suggested by Peter is:
- boot machine
- offline all CPUs except one
- taskset -p ffffffff $$
- online all CPUs

Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly.

Quoted 4 lines
Fixes 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask")

Originally-from: Peter Zijlstra (Intel) <[email protected]>

So, this is the replacement for the first patch[1] Will posted, right?

Quoted 15 lines

void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask) {

kernel/cgroup/cpuset.c +9 -1
 	unsigned long flags;
+	struct cpuset *cs;
 
 	spin_lock_irqsave(&callback_lock, flags);
-	guarantee_online_cpus(tsk, pmask);
+	rcu_read_lock();
+
+	cs = task_cs(tsk);
+	if (cs != &top_cpuset)
+		guarantee_online_cpus(tsk, pmask);
+	/*
+	 * TODO: Tasks in the top cpuset won't get update to their cpumasks
+	 * when a hotplug online/offline event happens. So we include all

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3736

Quoted 10 lines
kernel/cgroup/cpuset.c +10 -0
+	 * offline cpus in the allowed cpu list.
+	 */
+	if ((cs == &top_cpuset) || cpumask_empty(pmask)) {
+		const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
+
+		/*
+		 * We first exclude cpus allocated to partitions. If there is no
+		 * allowable online cpu left, we fall back to all possible cpus.
+		 */
+		cpumask_andnot(pmask, possible_mask, top_cpuset.subparts_cpus);

and the differences are that

* It's only applied to the root cgroup.

* Cpus taken up by partitions are excluded.

Is my understanding correct?

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3742

Quoted 6 lines
kernel/cgroup/cpuset.c +5 -0
+		if (!cpumask_intersects(pmask, cpu_online_mask))
+			cpumask_copy(pmask, possible_mask);
+	}
+
+	rcu_read_unlock();
 	spin_unlock_irqrestore(&callback_lock, flags);

So, I suppose you're suggesting applying this patch instead of the one Will Deacon posted[1] and we need Will's second patch[2] on top, right?

Quoted 2 lines

[1] http://lkml.kernel.org/r/20230131221719.3176-3-will-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
[2] http://lkml.kernel.org/r/20230131221719.3176-3-will-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org

FWIW, although I tend to share Peter's sentiments in this thread, I took this (+ my second patch) for a spin and my tests are giving the same results when compared with Peter's patch.

Will

author maintainer
#5 lore raw
In reply to Peter Zijlstra
Quoted 25 lines · Peter Zijlstra
Quoted 14 lines · Waiman Long

Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed.

One way to reproduce this as suggested by Peter is:
- boot machine
- offline all CPUs except one
- taskset -p ffffffff $$
- online all CPUs

Quoted 5 lines

Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly.

So you get the task_cpu_possible_mask() interaction vs cpusets horribly wrong here, but given the very sorry state of task_cpu_possible_mask() correctness of cpuset as a whole that might just not matter at this point.

Quoted 6 lines

I do very much hate how you add exceptions on exceptions instead of looking to do something right :-(

Fixing that parition case in my patch is 1 extra line and then I think it fundamentally does the right thing and can serve as a basis for fixing cpuset as a whole.

I am not saying that your patch is incorrect other than handling the partition case. However, it is rather complex and is hard to understand especially for those that are not that familiar with the cpuset code. From the maintainability point of view, a simpler solution that is easier to understand is better.

If we want to get it into the next merge windows, there isn't much time left for linux-next testing. So a lower risk solution is better from that perspective too.

Quoted 25 lines
Quoted 25 lines
Fixes 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask")

Originally-from: Peter Zijlstra (Intel) <[email protected]>

---
  kernel/cgroup/cpuset.c | 27 +++++++++++++++++++++++++--
  1 file changed, 25 insertions(+), 2 deletions(-)
kernel/cgroup/cpuset.c +2 -1
index 207bafdb05e8..11554e5845f7 100644
@@ -3707,15 +3707,38 @@ void __init cpuset_init_smp(void)
   * Description: Returns the cpumask_var_t cpus_allowed of the cpuset
   * attached to the specified @tsk.  Guaranteed to return some non-empty
   * subset of cpu_online_mask, even if this means going outside the
- * tasks cpuset.
+ * tasks cpuset, except when the task is in the top cpuset.
   **/
 
  void cpuset_cpus_allowed(struct task_struct *tsk, struct cpumask *pmask)
  {
  	unsigned long flags;
+	struct cpuset *cs;
 
Quoted 15 lines

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3728

Quoted 12 lines
kernel/cgroup/cpuset.c +10 -1
  	spin_lock_irqsave(&callback_lock, flags);
-	guarantee_online_cpus(tsk, pmask);
+	rcu_read_lock();
+
+	cs = task_cs(tsk);
+	if (cs != &top_cpuset)
+		guarantee_online_cpus(tsk, pmask);
+	/*
+	 * TODO: Tasks in the top cpuset won't get update to their cpumasks
+	 * when a hotplug online/offline event happens. So we include all
+	 * offline cpus in the allowed cpu list.
+	 */

I don't like TODO there, I really don't think CPUSET should update root tasks, that means yet another fundamental difference between CPUSET={y,n}.

OK, I can remove the "TODO". I have no objection to that.

Quoted 17 lines
Quoted 6 lines
kernel/cgroup/cpuset.c +5 -0
+	if ((cs == &top_cpuset) || cpumask_empty(pmask)) {
+		const struct cpumask *possible_mask = task_cpu_possible_mask(tsk);
+
+		/*
+		 * We first exclude cpus allocated to partitions. If there is no

kernel/cgroup/cpuset.c void __init cpuset_init_smp(void) · line 3743

Quoted 10 lines
kernel/cgroup/cpuset.c +8 -0
+		 * allowable online cpu left, we fall back to all possible cpus.
+		 */
+		cpumask_andnot(pmask, possible_mask, top_cpuset.subparts_cpus);
+		if (!cpumask_intersects(pmask, cpu_online_mask))
+			cpumask_copy(pmask, possible_mask);
+	}
+
+	rcu_read_unlock();
  	spin_unlock_irqrestore(&callback_lock, flags);
  }

I really detest this patch, but if you insist it might just do :-/

If we decide that we should always try to keep possible offline cpus in a task's cpumask. We could adopt your solution or we can try to keep that information in the cpuset structure itself. At this point, I don't see any advantage in doing that except for tasks in the top cpuset because the hotplug code won't update their cpumasks. Also inferring offline cpus that should be in the cpuset is only possible with cgroup v2. It does not work for v1. So it is also not a complete solution. To be complete, we may need keep this information in the cpuset.

Cheers,
Longman

#6 lore raw
Quoted 39 lines · Waiman Long
Quoted 25 lines · Peter Zijlstra
Quoted 14 lines · Waiman Long

Since commit 8f9ea86fdf99 ("sched: Always preserve the user requested cpumask"), relax_compatible_cpus_allowed_ptr() is calling __sched_setaffinity() unconditionally. This helps to expose a bug in the current cpuset hotplug code where the cpumasks of the tasks in the top cpuset are not updated at all when some CPUs become online or offline. It is likely caused by the fact that some of the tasks in the top cpuset, like percpu kthreads, cannot have their cpu affinity changed.

One way to reproduce this as suggested by Peter is:
- boot machine
- offline all CPUs except one
- taskset -p ffffffff $$
- online all CPUs

Quoted 5 lines

Fix this by allowing cpuset_cpus_allowed() to return a wider mask that includes offline CPUs for those tasks that are in the top cpuset. For tasks not in the top cpuset, the old rule applies and only online CPUs will be returned in the mask since hotplug events will update their cpumasks accordingly.

So you get the task_cpu_possible_mask() interaction vs cpusets horribly wrong here, but given the very sorry state of task_cpu_possible_mask() correctness of cpuset as a whole that might just not matter at this point.

Quoted 6 lines

I do very much hate how you add exceptions on exceptions instead of looking to do something right :-(

Fixing that parition case in my patch is 1 extra line and then I think it fundamentally does the right thing and can serve as a basis for fixing cpuset as a whole.

I am not saying that your patch is incorrect other than handling the partition case. However, it is rather complex and is hard to understand especially for those that are not that familiar with the cpuset code. From the maintainability point of view, a simpler solution that is easier to understand is better.

Quoted 3 lines

If we want to get it into the next merge windows, there isn't much time left for linux-next testing. So a lower risk solution is better from that perspective too.

This needs to land for 6.2 to fix the regression. The next merge window is too late. That's why I cooked the reverts [1] as an alternative.

Will

[1] https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=ssa-reverts

maintainer
#7 lore raw

Hello,

Quoted 6 lines · Will Deacon
Quoted 3 lines

If we want to get it into the next merge windows, there isn't much time left for linux-next testing. So a lower risk solution is better from that perspective too.

This needs to land for 6.2 to fix the regression. The next merge window is too late. That's why I cooked the reverts [1] as an alternative.

Yeah, I think Waiman meant before the coming merge window. We have at least one more week so let's try the two patches and see how that goes. We can always revert if it doesn't work out.

Thanks.

Signature · 1 line
tejun
#8 lore raw
Quoted 11 lines · Tejun Heo
Quoted 6 lines · Will Deacon
Quoted 3 lines

If we want to get it into the next merge windows, there isn't much time left for linux-next testing. So a lower risk solution is better from that perspective too.

This needs to land for 6.2 to fix the regression. The next merge window is too late. That's why I cooked the reverts [1] as an alternative.

Yeah, I think Waiman meant before the coming merge window. We have at least one more week so let's try the two patches and see how that goes. We can always revert if it doesn't work out.

I see this has landed in Linus' tree now, so thanks for that! I also tested his branch just to make sure and it all seems fine in my asymmetric environment.

Cheers,

Will