[PATCHSET wq/for-4.9] workqueue: make workqueue available very early during boot
From: Tejun Heo
Date: Thu Sep 15 2016 - 15:30:48 EST
Workqueue is currently initialized in an early init call; however,
there are cases where early boot code has to be split and reordered to
come after workqueue initialization or the same code path which makes
use of workqueues is used both before workqueue initailization and
after. The latter cases have to gate workqueue usages with
keventd_up() tests, which is nasty and easy to get wrong.
This patchset makes workqueue creation and work item
queueing/canceling available from very early during boot which allows
all existing usages of keventd_up() which is removed by the last
This patchset contains the following seven patches.
The patchset is also available in the following git branch.
Once the patches are reviewed, I'll route the patches through the
wq/for-4.9 branch. diffstat follows. Thanks.
arch/x86/kernel/cpu/mcheck/mce.c | 2 -
drivers/tty/vt/vt.c | 4 --
include/linux/workqueue.h | 11 +----
init/main.c | 10 +++++
kernel/power/qos.c | 11 -----
kernel/workqueue.c | 77 ++++++++++++++++++++++++++++++---------
lib/debugobjects.c | 2 -
mm/slab.c | 7 ---
8 files changed, 78 insertions(+), 46 deletions(-)