lkml.org 
[lkml]   [2020]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 06/10] workqueue: use wq_online_cpumask in restore_unbound_workers_cpumask()
Date
From: Lai Jiangshan <laijs@linux.alibaba.com>

restore_unbound_workers_cpumask() is called when CPU_ONLINE, where
wq_online_cpumask equals to cpu_online_mask. So no fucntionality
changed.

Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
---
kernel/workqueue.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 8aca3afc88aa..878ed83e5908 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -5039,13 +5039,14 @@ static void restore_unbound_workers_cpumask(struct worker_pool *pool, int cpu)
static cpumask_t cpumask;
struct worker *worker;

+ lockdep_assert_held(&wq_pool_mutex);
lockdep_assert_held(&wq_pool_attach_mutex);

/* is @cpu allowed for @pool? */
if (!cpumask_test_cpu(cpu, pool->attrs->cpumask))
return;

- cpumask_and(&cpumask, pool->attrs->cpumask, cpu_online_mask);
+ cpumask_and(&cpumask, pool->attrs->cpumask, wq_online_cpumask);

/* is @cpu the first one onlined for the @pool? */
if (cpumask_weight(&cpumask) > 1)
--
2.19.1.6.gb485710b
\
 
 \ /
  Last update: 2020-12-14 15:58    [W:0.187 / U:0.884 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site