Re: [PATCH 17/33] cpuset: Propagate cpuset isolation update to workqueue through housekeeping

From: Waiman Long
Date: Sun Aug 31 2025 - 22:51:44 EST



On 8/29/25 11:47 AM, Frederic Weisbecker wrote:
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -102,6 +102,7 @@ EXPORT_SYMBOL_GPL(housekeeping_test_cpu);
int housekeeping_update(struct cpumask *mask, enum hk_type type)
{
struct cpumask *trial, *old = NULL;
+ int err;
if (type != HK_TYPE_DOMAIN)
return -ENOTSUPP;
@@ -126,10 +127,11 @@ int housekeeping_update(struct cpumask *mask, enum hk_type type)
mem_cgroup_flush_workqueue();
vmstat_flush_workqueue();
+ err = workqueue_unbound_exclude_cpumask(housekeeping_cpumask(type));
kfree(old);
- return 0;
+ return err;
}

Actually workqueue_unbound_exclude_cpumask() expects a cpumask of all the CPUs that have been isolated. IOW, all the CPUs that are not in housekeeping_cpumask(HK_TYPE_DOMAIN). So we do the inversion here or we rename the function to, e.g. workqueue_unbound_cpumask_update() and make the change there.

Cheers,
Longman