[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240704034915.2164-1-jiangshanlai@gmail.com>
Date: Thu, 4 Jul 2024 11:49:09 +0800
From: Lai Jiangshan <jiangshanlai@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <jiangshan.ljs@...group.com>,
Tejun Heo <tj@...nel.org>,
Juri Lelli <juri.lelli@...hat.com>,
Waiman Long <longman@...hat.com>
Subject: [PATCH V2 0/5] workqueue: Make the PWQ allocation and WQ enlistment atomic
From: Lai Jiangshan <jiangshan.ljs@...group.com>
The PWQ allocation and WQ enlistment are not within the same lock-held
critical section; therefore, their states can become out of sync when
the user modifies the unbound mask or if CPU hotplug events occur in
the interim since those operations only update the WQs that are already
in the list.
Change from v1:
Init rescuer's affinities as the wq's effective cpumask
Cc: Tejun Heo <tj@...nel.org>
Cc: Juri Lelli <juri.lelli@...hat.com>
Cc: Waiman Long <longman@...hat.com>
V1: https://lore.kernel.org/lkml/20240703033855.3373-1-jiangshanlai@gmail.com/
Lai Jiangshan (5):
workqueue: Register sysfs after the whole creation of the new wq
workqueue: Make rescuer initialization as the last step of the
creation of a new wq
workqueue: Move kthread_flush_worker() out of alloc_and_link_pwqs()
workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S.
workqueue: Init rescuer's affinities as the wq's effective cpumask
kernel/workqueue.c | 87 +++++++++++++++++++++++++---------------------
1 file changed, 47 insertions(+), 40 deletions(-)
--
2.19.1.6.gb485710b
Powered by blists - more mailing lists