linux/init
Lai Jiangshan 759ee0915d init,cpuset: fix initialize order
Impact: cpuset_wq should be initialized after init_workqueues()

When I read /debugfs/tracing/trace_stat/workqueues,
I got this:

 # CPU  INSERTED  EXECUTED   NAME
 # |      |         |          |

   0      0          0       cpuset
   0    285        285       events/0
   0      2          2       work_on_cpu/0
   0   1115       1115       khelper
   0    325        325       kblockd/0
   0      0          0       kacpid
   0      0          0       kacpi_notify
   0      0          0       ata/0
   0      0          0       ata_aux
   0      0          0       ksuspend_usbd
   0      0          0       aio/0
   0      0          0       nfsiod
   0      0          0       kpsmoused
   0      0          0       kstriped
   0      0          0       kondemand/0
   0      1          1       hid_compat
   0      0          0       rpciod/0

   1     64         64       events/1
   1      2          2       work_on_cpu/1
   1      5          5       kblockd/1
   1      0          0       ata/1
   1      0          0       aio/1
   1      0          0       kondemand/1
   1      0          0       rpciod/1

I found "cpuset" is at the earliest.

I found a create_singlethread_workqueue() is earlier than
init_workqueues():

kernel_init()
->cpuset_init_smp()
  ->create_singlethread_workqueue()
->do_basic_setup()
  ->init_workqueues()

I think it's better that create_singlethread_workqueue() is called
after workqueue subsystem has been initialized.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Steven Rostedt <srostedt@redhat.com>
Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Paul Menage <menage@google.com>
Cc: miaoxie <miaox@cn.fujitsu.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
LKML-Reference: <49C9F416.1050707@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-03-25 18:32:35 +01:00
..
calibrate.c x86: remove stray <6> in BogoMIPS printk 2008-07-28 14:22:26 +02:00
do_mounts_initrd.c Freezer: Fix s2disk resume from initrd 2007-11-20 22:22:42 -05:00
do_mounts_md.c Consolidate driver_probe_done() loops into one place 2009-02-21 14:17:17 -08:00
do_mounts_rd.c init: make initrd/initramfs decompression failure a KERN_EMERG event 2009-01-14 11:28:35 -08:00
do_mounts.c Consolidate driver_probe_done() loops into one place 2009-02-21 14:17:17 -08:00
do_mounts.h make init/do_mounts.c:root_device_name static 2008-07-26 12:00:12 -07:00
initramfs.c init: make initrd/initramfs decompression failure a KERN_EMERG event 2009-01-14 11:28:35 -08:00
Kconfig Merge branch 'core/locking' into tracing/ftrace 2009-03-13 01:33:21 +01:00
main.c init,cpuset: fix initialize order 2009-03-25 18:32:35 +01:00
Makefile kbuild: fix make V=1 2008-02-11 17:43:54 +01:00
noinitramfs.c [PATCH] disable init/initramfs.c 2007-02-11 10:51:25 -08:00
version.c init/version.c: define version_string only if CONFIG_KALLSYMS is not defined 2008-07-25 10:53:29 -07:00