diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2009-03-25 05:06:30 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-03-25 13:32:35 -0400 |
commit | 759ee0915dd713361e72facb78b66600b5712d65 (patch) | |
tree | 82dd16d74a0c4d5118c4e8d3bddea2dc9309e9fc /init | |
parent | 2f63b840bc8a816ac879ee773b035cf3e433fae4 (diff) |
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>
Diffstat (limited to 'init')
-rw-r--r-- | init/main.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/init/main.c b/init/main.c index 20d784ab5ef8..b0097d2b63ae 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -772,6 +772,7 @@ static void __init do_basic_setup(void) | |||
772 | { | 772 | { |
773 | rcu_init_sched(); /* needed by module_init stage. */ | 773 | rcu_init_sched(); /* needed by module_init stage. */ |
774 | init_workqueues(); | 774 | init_workqueues(); |
775 | cpuset_init_smp(); | ||
775 | usermodehelper_init(); | 776 | usermodehelper_init(); |
776 | driver_init(); | 777 | driver_init(); |
777 | init_irq_proc(); | 778 | init_irq_proc(); |
@@ -865,8 +866,6 @@ static int __init kernel_init(void * unused) | |||
865 | smp_init(); | 866 | smp_init(); |
866 | sched_init_smp(); | 867 | sched_init_smp(); |
867 | 868 | ||
868 | cpuset_init_smp(); | ||
869 | |||
870 | do_basic_setup(); | 869 | do_basic_setup(); |
871 | 870 | ||
872 | /* | 871 | /* |