From patchwork Tue Dec 8 09:44:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Surbhi Palande X-Patchwork-Id: 40604 X-Patchwork-Delegate: apw@canonical.com 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 3DE6CB7088 for ; Tue, 8 Dec 2009 20:44:55 +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 1NHwck-0006aE-Bk; Tue, 08 Dec 2009 09:44:50 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.60) (envelope-from ) id 1NHwca-0006WU-1g for kernel-team@lists.ubuntu.com; Tue, 08 Dec 2009 09:44:40 +0000 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1NHwcZ-0006fG-V2 for ; Tue, 08 Dec 2009 09:44:39 +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 1NHwcZ-0005le-Om for kernel-team@lists.ubuntu.com; Tue, 08 Dec 2009 09:44:39 +0000 From: Surbhi Palande To: kernel-team@lists.ubuntu.com Subject: [v2] [PATCH 0/2] Populate rootfs asynchronously and early Date: Tue, 8 Dec 2009 11:44:35 +0200 Message-Id: <1260265475-4303-3-git-send-email-surbhi.palande@canonical.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: <1260265475-4303-1-git-send-email-surbhi.palande@canonical.com> References: <1260265475-4303-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 might reduce 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 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);