From patchwork Mon Dec 7 17:32:07 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Surbhi Palande X-Patchwork-Id: 40516 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id D66E0B6F12 for ; Tue, 8 Dec 2009 04:32:26 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1NHhRc-0005RR-B5; Mon, 07 Dec 2009 17:32:20 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1NHhRT-0005Q1-3i for kernel-team@lists.ubuntu.com; Mon, 07 Dec 2009 17:32:11 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1NHhRS-0003P3-N1 for ; Mon, 07 Dec 2009 17:32:10 +0000 Received: from a88-112-252-196.elisa-laajakaista.fi ([88.112.252.196] helo=canonical.com) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1NHhRS-0007VF-Gh for kernel-team@lists.ubuntu.com; Mon, 07 Dec 2009 17:32:10 +0000 From: Surbhi Palande To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2] Starting the population of rootfs early during boot Date: Mon, 7 Dec 2009 19:32:07 +0200 Message-Id: <1260207127-7736-3-git-send-email-surbhi.palande@canonical.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1260207127-7736-1-git-send-email-surbhi.palande@canonical.com> References: <1260207127-7736-1-git-send-email-surbhi.palande@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.8 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com Starting the asynchronous population of rootfs early in the boot sequence reduces the boot time. Signed-off-by: Surbhi Palande --- 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);