public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 0/5] workqueue: Make the PWQ allocation and WQ enlistment atomic
@ 2024-07-04  3:49 Lai Jiangshan
  2024-07-04  3:49 ` [PATCH V2 1/5] workqueue: Register sysfs after the whole creation of the new wq Lai Jiangshan
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Lai Jiangshan @ 2024-07-04  3:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Lai Jiangshan, Tejun Heo, Juri Lelli, Waiman Long

From: Lai Jiangshan <jiangshan.ljs@antgroup.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@kernel.org>
Cc: Juri Lelli <juri.lelli@redhat.com>
Cc: Waiman Long <longman@redhat.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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-07-09 14:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-04  3:49 [PATCH V2 0/5] workqueue: Make the PWQ allocation and WQ enlistment atomic Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 1/5] workqueue: Register sysfs after the whole creation of the new wq Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 2/5] workqueue: Make rescuer initialization as the last step of the creation of a " Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 3/5] workqueue: Move kthread_flush_worker() out of alloc_and_link_pwqs() Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 4/5] workqueue: Put PWQ allocation and WQ enlistment in the same lock C.S Lai Jiangshan
2024-07-08  7:54   ` kernel test robot
2024-07-08 18:16     ` Tejun Heo
2024-07-09 14:55       ` Lai Jiangshan
2024-07-04  3:49 ` [PATCH V2 5/5] workqueue: Init rescuer's affinities as the wq's effective cpumask Lai Jiangshan
2024-07-05 19:15 ` [PATCH V2 0/5] workqueue: Make the PWQ allocation and WQ enlistment atomic Tejun Heo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox