lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220331055717.2659428-1-qiang1.zhang@intel.com>
Date:   Thu, 31 Mar 2022 13:57:17 +0800
From:   Zqiang <qiang1.zhang@...el.com>
To:     jiangshanlai@...il.com, tj@...nel.org
Cc:     linux-kernel@...r.kernel.org
Subject: [PATCH v2] workqueue: Restrict kworker in the offline CPU pool running on housekeeping CPUs

When CPU going offline, all workers in this CPU pool will lose
affinity to this CPU, and may run to isolated CPU. like kworker
in unbound pool, set CPU affinity of these kworker is
wq_unbound_cpumask.

Signed-off-by: Zqiang <qiang1.zhang@...el.com>
---
 v1->v2:
 Replace housekeeping_cpumask(HK_TYPE_WQ) with wq_unbound_cpumask.

 kernel/workqueue.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index abcc9a2ac319..b447012df177 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5023,7 +5023,7 @@ static void unbind_workers(int cpu)
 
 		for_each_pool_worker(worker, pool) {
 			kthread_set_per_cpu(worker->task, -1);
-			WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, cpu_possible_mask) < 0);
+			WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, wq_unbound_cpumask) < 0);
 		}
 
 		mutex_unlock(&wq_pool_attach_mutex);
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ