From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754230AbcIOTal (ORCPT ); Thu, 15 Sep 2016 15:30:41 -0400 Received: from mail-yb0-f194.google.com ([209.85.213.194]:36331 "EHLO mail-yb0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751627AbcIOTad (ORCPT ); Thu, 15 Sep 2016 15:30:33 -0400 From: Tejun Heo To: torvalds@linux-foundation.org Cc: linux-kernel@vger.kernel.org, jiangshanlai@gmail.com, akpm@linux-foundation.org, kernel-team@fb.com Subject: [PATCHSET wq/for-4.9] workqueue: make workqueue available very early during boot Date: Thu, 15 Sep 2016 15:30:14 -0400 Message-Id: <1473967821-24363-1-git-send-email-tj@kernel.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, 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 patch. This patchset contains the following seven patches. 0001-workqueue-make-workqueue-available-early-during-boot.patch 0002-mce-workqueue-remove-keventd_up-usage.patch 0003-tty-workqueue-remove-keventd_up-usage.patch 0004-power-workqueue-remove-keventd_up-usage.patch 0005-slab-workqueue-remove-keventd_up-usage.patch 0006-debugobj-workqueue-remove-keventd_up-usage.patch 0007-workqueue-remove-keventd_up.patch The patchset is also available in the following git branch. git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git review-wq-early 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(-) -- tejun