diff mbox

[2/2] Starting the population of rootfs early during boot

Message ID 1260207127-7736-3-git-send-email-surbhi.palande@canonical.com
State Rejected
Headers show

Commit Message

Surbhi Palande Dec. 7, 2009, 5:32 p.m. UTC
Starting the asynchronous population of rootfs early in
the boot sequence reduces 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(-)

Comments

Andy Whitcroft Dec. 7, 2009, 6:21 p.m. UTC | #1
On Mon, Dec 07, 2009 at 07:32:07PM +0200, Surbhi Palande wrote:
> Starting the asynchronous population of rootfs early in
> the boot sequence reduces the boot time.

Its not obvious that the statistics we have back that up.  If the
initramfs was somewhat larger they might show that but right now there
difference is well within the variance we get on KeybUk's graphs.

> 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(-)
> 
> 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 ff8bde5..39521cf 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 aad2c28..a8f2d2d 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, &rootfs_fn_list);
>  }
>  
> -rootfs_initcall(populate_rootfs);
> +earlyrootfs_initcall(populate_rootfs);

Otherwise the patch looks fine.

-apw
diff mbox

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 ff8bde5..39521cf 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 aad2c28..a8f2d2d 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, &rootfs_fn_list);
 }
 
-rootfs_initcall(populate_rootfs);
+earlyrootfs_initcall(populate_rootfs);