[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220804084135.92425-1-jiangshanlai@gmail.com>
Date: Thu, 4 Aug 2022 16:41:27 +0800
From: Lai Jiangshan <jiangshanlai@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <jiangshan.ljs@...group.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Tejun Heo <tj@...nel.org>, Petr Mladek <pmladek@...e.com>,
Michal Hocko <mhocko@...e.com>,
Peter Zijlstra <peterz@...radead.org>,
Wedson Almeida Filho <wedsonaf@...gle.com>
Subject: [RFC PATCH 0/8] workqueue: Fix for prematurely wakeups and cleanups
From: Lai Jiangshan <jiangshan.ljs@...group.com>
Patch1-3 are fixes for prematurely wakeups and patch4-8 are cleanups.
Patch2 fixes when prematurely wakeup happens after kthread_bind_mask().
Patch3 fixes when prematurely wakeup happens before kthread_bind_mask().
Patch1 prepares for patch2-3.
Like Petr's patch[1], a completion is introduced to do the synchronization,
but the synchronization is done in a different direction which allows the
newly created worker itself do some initialization instead of the manager
and allows for a more simplified code.
(The changed synchronization direction is not necessarily better.)
And make workqueue code less dependence on the semantics that kthread
provides.
[1]: https://lore.kernel.org/all/20220622140853.31383-1-pmladek@suse.com/
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: Tejun Heo <tj@...nel.org>,
Cc: Petr Mladek <pmladek@...e.com>
Cc: Michal Hocko <mhocko@...e.com>,
Cc: Peter Zijlstra <peterz@...radead.org>,
Cc: Wedson Almeida Filho <wedsonaf@...gle.com>
Lai Jiangshan (8):
workqueue: Unconditionally set cpumask in worker_attach_to_pool()
workqueue: Make create_worker() safe against prematurely wakeups
workqueue: Set PF_NO_SETAFFINITY instead of kthread_bind_mask()
workqueue: Set/Clear PF_WQ_WORKER while attaching/detaching
workqueue: Use worker_set_flags() in worker_enter_idle()
workqueue: Simplify the starting of the newly created worker
workqueue: Remove the outer loop in maybe_create_worker()
workqueue: Move the locking out of maybe_create_worker()
kernel/workqueue.c | 123 +++++++++++++++---------------------
kernel/workqueue_internal.h | 11 +++-
2 files changed, 60 insertions(+), 74 deletions(-)
--
2.19.1.6.gb485710b
Powered by blists - more mailing lists