diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-24 16:14:20 +0100 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-24 16:14:20 +0100 |
commit | ee4569a3a75e1a5ed53b0c4ff4d9fc456aa98ef1 (patch) | |
tree | 97f92d5cea13cdd1f2419d3b7cedfd384a4df6b5 | |
parent | 6dca467a76bb0ed71d65143b235e0ef80e44436f (diff) | |
download | op-kernel-dev-ee4569a3a75e1a5ed53b0c4ff4d9fc456aa98ef1.zip op-kernel-dev-ee4569a3a75e1a5ed53b0c4ff4d9fc456aa98ef1.tar.gz |
init: don't call flush_scheduled_work() from do_initcalls()
The call to flush_scheduled_work() in do_initcalls() is there to make
sure all works queued to system_wq by initcalls finish before the init
sections are dropped.
However, the call doesn't make much sense at this point - there
already are multiple different workqueues and different subsystems are
free to create and use their own. Ordering requirements are and
should be expressed explicitly.
Drop the call to prepare for the deprecation and removal of
flush_scheduled_work().
Andrew suggested adding sanity check where the workqueue code checks
whether any pending or running work has the work function in the init
text section. However, checking this for running works requires the
worker to keep track of the current function being executed, and
checking only the pending works will miss most cases. As a violation
will almost always be caught by the usual page fault mechanism, I
don't think it would be worthwhile to make the workqueue code track
extra state just for this.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | init/main.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/init/main.c b/init/main.c index 8646401..5421e8f 100644 --- a/init/main.c +++ b/init/main.c @@ -775,9 +775,6 @@ static void __init do_initcalls(void) for (fn = __early_initcall_end; fn < __initcall_end; fn++) do_one_initcall(*fn); - - /* Make sure there is no pending stuff from the initcall sequence */ - flush_scheduled_work(); } /* |