[RFC PATCH 16/18] cgroup/cpuset: Don't set have_boot_nohz_full without any boot time nohz_full CPU
From: Waiman Long
Date: Fri Aug 08 2025 - 11:25:18 EST
As HK_TYPE_KERNEL_NOISE bit can now be set without any nohz_full CPU
specified at boot time, don't set have_boot_nohz_full in this case.
Signed-off-by: Waiman Long <longman@xxxxxxxxxx>
---
kernel/cgroup/cpuset.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c
index de9cb92a0fc7..489708f4e096 100644
--- a/kernel/cgroup/cpuset.c
+++ b/kernel/cgroup/cpuset.c
@@ -3871,7 +3871,12 @@ int __init cpuset_init(void)
BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL));
- have_boot_nohz_full = housekeeping_enabled(HK_TYPE_KERNEL_NOISE);
+ /*
+ * HK_TYPE_KERNEL_NOISE bit can be set without any nohz_full CPU
+ */
+ have_boot_nohz_full = housekeeping_enabled(HK_TYPE_KERNEL_NOISE) &&
+ !cpumask_equal(cpu_possible_mask,
+ housekeeping_cpumask(HK_TYPE_KERNEL_NOISE));
have_boot_isolcpus = housekeeping_enabled(HK_TYPE_DOMAIN);
if (have_boot_nohz_full) {
BUG_ON(!alloc_cpumask_var(&boot_nohz_full_hk_cpus, GFP_KERNEL));
--
2.50.0