aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-01-18 17:05:56 -0500
committerTejun Heo <tj@kernel.org>2013-01-18 17:05:56 -0500
commitbb813f4c933ae9f887a014483690d5f8b8ec05e1 (patch)
tree04107b0ae2d1881960dea63b623915db159ecacc /include
parent84b233adcca3cacd5cfa8013a5feda7a3db4a9af (diff)
init, block: try to load default elevator module early during boot
This patch adds default module loading and uses it to load the default block elevator. During boot, it's called right after initramfs or initrd is made available and right before control is passed to userland. This ensures that as long as the modules are available in the usual places in initramfs, initrd or the root filesystem, the default modules are loaded as soon as possible. This will replace the on-demand elevator module loading from elevator init path. v2: Fixed build breakage when !CONFIG_BLOCK. Reported by kbuild test robot. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Jens Axboe <axboe@kernel.dk> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Alex Riesen <raa.lkml@gmail.com> Cc: Fengguang We <fengguang.wu@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/elevator.h5
-rw-r--r--include/linux/init.h1
2 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/elevator.h b/include/linux/elevator.h
index c03af7687bb4..186620631750 100644
--- a/include/linux/elevator.h
+++ b/include/linux/elevator.h
@@ -138,6 +138,7 @@ extern void elv_drain_elevator(struct request_queue *);
138/* 138/*
139 * io scheduler registration 139 * io scheduler registration
140 */ 140 */
141extern void __init load_default_elevator_module(void);
141extern int elv_register(struct elevator_type *); 142extern int elv_register(struct elevator_type *);
142extern void elv_unregister(struct elevator_type *); 143extern void elv_unregister(struct elevator_type *);
143 144
@@ -206,5 +207,9 @@ enum {
206 INIT_LIST_HEAD(&(rq)->csd.list); \ 207 INIT_LIST_HEAD(&(rq)->csd.list); \
207 } while (0) 208 } while (0)
208 209
210#else /* CONFIG_BLOCK */
211
212static inline void load_default_elevator_module(void) { }
213
209#endif /* CONFIG_BLOCK */ 214#endif /* CONFIG_BLOCK */
210#endif 215#endif
diff --git a/include/linux/init.h b/include/linux/init.h
index a799273714ac..9230c9408d8b 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -161,6 +161,7 @@ extern unsigned int reset_devices;
161/* used by init/main.c */ 161/* used by init/main.c */
162void setup_arch(char **); 162void setup_arch(char **);
163void prepare_namespace(void); 163void prepare_namespace(void);
164void __init load_default_modules(void);
164 165
165extern void (*late_time_init)(void); 166extern void (*late_time_init)(void);
166 167