Patchwork [v2,0/2] Populate rootfs asynchronously and early

login
register
mail settings
Submitter Surbhi Palande
Date Dec. 8, 2009, 9:44 a.m.
Message ID <1260265475-4303-3-git-send-email-surbhi.palande@canonical.com>
Download mbox | patch
Permalink /patch/40604/
State Rejected
Delegated to: Andy Whitcroft
Headers show

Comments

Surbhi Palande - Dec. 8, 2009, 9:44 a.m.
Starting the asynchronous population of rootfs early in
the boot sequence might reduce the boot time.

Signed-off-by: Surbhi Palande <surbhi.palande@canonical.com>
---
 include/asm-generic/vmlinux.lds.h |    1 +
 include/linux/init.h              |    1 +
 init/initramfs.c                  |    2 +-
 3 files changed, 3 insertions(+), 1 deletions(-)

Patch

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index b6e818f..d4db519 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -584,6 +584,7 @@ 
   	*(.initcall0.init)						\
   	*(.initcall0s.init)						\
   	*(.initcall1.init)						\
+	*(.initcallearlyrootfs.init)                                    \
   	*(.initcall1s.init)						\
   	*(.initcall2.init)						\
   	*(.initcall2s.init)						\
diff --git a/include/linux/init.h b/include/linux/init.h
index b57935f..4aeb7bd 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -185,6 +185,7 @@  extern void (*late_time_init)(void);
 #define pure_initcall(fn)		__define_initcall("0",fn,0)
 
 #define core_initcall(fn)		__define_initcall("1",fn,1)
+#define earlyrootfs_initcall(fn)   __define_initcall("earlyrootfs",fn,rootfs)
 #define core_initcall_sync(fn)		__define_initcall("1s",fn,1s)
 #define postcore_initcall(fn)		__define_initcall("2",fn,2)
 #define postcore_initcall_sync(fn)	__define_initcall("2s",fn,2s)
diff --git a/init/initramfs.c b/init/initramfs.c
index b8f9e3c..b04c274 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -614,4 +614,4 @@  static int __init populate_rootfs(void)
 	async_schedule_domain(async_populate_rootfs, NULL, &populate_rootfs_domain);
 }
 
-rootfs_initcall(populate_rootfs);
+earlyrootfs_initcall(populate_rootfs);