raid: make RAID autodetect default a KConfig option
Subsystems (3)
PATCH 1/1 raid: make RAID autodetect default a KConfig option
Quoted 2 lines
From
812bf9a448d96375a3aec5c51764d74cace85abbMon Sep 17 00:00:00 2001
From: Arjan van de Ven <[email protected]>
Date: Sun, 21 Sep 2008 15:44:32 -0700
Subject: [PATCH] raid: make RAID autodetect default a KConfig option
RAID autodetect has the side effect of requiring synchronisation of all device drivers, which can make the boot several seconds longer (I've measured 7 on one of my laptops).... even for systems that don't have RAID setup for the root filesystem (the only FS where this matters).
This patch makes the default for autodetect a config option; either way the user can always override via the kernel command line.
--- drivers/md/Kconfig | 14 ++++++++++++++ init/do_mounts_md.c | 11 +++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-)
drivers/md/Kconfig +14 -0
@@ -30,6 +30,20 @@ config BLK_DEV_MD If unsure, say N. +config MD_AUTODETECT + bool "Autodetect RAID arrays during kernel boot" + depends on BLK_DEV_MD + default y + ---help--- + If you say Y here, then the kernel will try to autodetect raid + arrays as part of its boot process. + + If you don't use raid and say Y, this autodetection can cause + a several-second delay in the boot time due to various + synchronisation steps that are part of this step. + + If unsure, say Y. + config MD_LINEAR tristate "Linear (append) mode" depends on BLK_DEV_MD
init/do_mounts_md.c +9 -2
@@ -12,7 +12,12 @@* The code for that is here. */ -static int __initdata raid_noautodetect, raid_autopart; +#ifdef CONFIG_MD_AUTODETECT +static int __initdata raid_noautodetect; +#else +static int __initdata raid_noautodetect=1 ; +#endif +static int __initdata raid_autopart; static struct { int minor;
@@ -252,6 +257,8 @@ static int __init raid_setup(char *str)if (!strncmp (str,"noautodetect" , wlen)) raid_noautodetect =1 ; +if (!strncmp (str,"autodetect" , wlen)) + raid_noautodetect =0 ;if (strncmp (str,"partitionable" , wlen)==0 ) raid_autopart =1 ;if (strncmp (str,"part" , wlen)==0 )
@@ -288,7 +295,7 @@ void __init md_run_setup(void)create_dev ("/dev/md0" ,MKDEV (MD_MAJOR ,0 ));if (raid_noautodetect) -printk (KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n" ); +printk (KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=autodetect will force)\n" );else autodetect_raid ();md_setup_drive ();
Signature · 7 lines
1.5.5.1 -- Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
Quoted 5 lines · Arjan van de Ven
From
812bf9a448d96375a3aec5c51764d74cace85abbMon Sep 17 00:00:00 2001
From: Arjan van de Ven <[email protected]>
Date: Sun, 21 Sep 2008 15:44:32 -0700
Subject: [PATCH] raid: make RAID autodetect default a KConfig option
Quoted 8 lines
RAID autodetect has the side effect of requiring synchronisation of all device drivers, which can make the boot several seconds longer (I've measured 7 on one of my laptops).... even for systems that don't have RAID setup for the root filesystem (the only FS where this matters).
This patch makes the default for autodetect a config option; either way the user can always override via the kernel command line.
Neil, if you agree with this patch, could you please send your Acked-by line? This patch depends on a clean-up in init/do_mounts_md.c that is in the fastboot tree so it would be logistically easier/better if we could queue this up towards upstream via tip/fastboot.
Ingo
Neil Brown
Acked-byQuoted 14 lines · On Monday September 22, [email protected] wrote:
Quoted 11 lines · Arjan van de Ven
From
812bf9a448d96375a3aec5c51764d74cace85abbMon Sep 17 00:00:00 2001
From: Arjan van de Ven <[email protected]>
Date: Sun, 21 Sep 2008 15:44:32 -0700
Subject: [PATCH] raid: make RAID autodetect default a KConfig optionRAID autodetect has the side effect of requiring synchronisation of all device drivers, which can make the boot several seconds longer (I've measured 7 on one of my laptops).... even for systems that don't have RAID setup for the root filesystem (the only FS where this matters).
Quoted 7 lines
Quoted 2 lines
This patch makes the default for autodetect a config option; either way the user can always override via the kernel command line.
Neil, if you agree with this patch, could you please send your Acked-by line? This patch depends on a clean-up in
init/do_mounts_md.cthat is in the fastboot tree so it would be logistically easier/better if we could queue this up towards upstream via tip/fastboot.
Yes,
I'm not a big fan of autodetect in any case, and this patch seems to cover all the bases I can think of.
Thanks,
NeilBrown
Quoted 26 lines · On Tue, 23 Sep 2008 13:45:19 +1000 Neil Brown <[email protected]> wrote:
Quoted 19 lines · On Monday September 22, [email protected] wrote:
Quoted 12 lines · Arjan van de Ven
From
812bf9a448d96375a3aec5c51764d74cace85abbMon Sep 17 00:00:00 2001 From: Arjan van de Ven <[email protected]>
Date: Sun, 21 Sep 2008 15:44:32 -0700
Subject: [PATCH] raid: make RAID autodetect default a KConfig optionRAID autodetect has the side effect of requiring synchronisation of all device drivers, which can make the boot several seconds longer (I've measured 7 on one of my laptops).... even for systems that don't have RAID setup for the root filesystem (the only FS where this matters).
Quoted 3 lines
This patch makes the default for autodetect a config option; either way the user can always override via the kernel command line.
Quoted 5 lines
Neil, if you agree with this patch, could you please send your Acked-by line? This patch depends on a clean-up in
init/do_mounts_md.cthat is in the fastboot tree so it would be logistically easier/better if we could queue this up towards upstream via tip/fastboot.
Quoted 6 lines
Yes,
Acked-by NeilBrown <[email protected]>I'm not a big fan of autodetect in any case, and this patch seems to cover all the bases I can think of.
thanks
pushed togit://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-fastboot.git
master
Ingo, please pull
Signature · 3 lines
Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
Ingo Molnar
Acked-by NeilBrownQuoted 36 lines · Arjan van de Ven
Quoted 26 lines · On Tue, 23 Sep 2008 13:45:19 +1000 Neil Brown <[email protected]> wrote:
Quoted 19 lines · On Monday September 22, [email protected] wrote:
Quoted 12 lines · Arjan van de Ven
From
812bf9a448d96375a3aec5c51764d74cace85abbMon Sep 17 00:00:00 2001 From: Arjan van de Ven <[email protected]>
Date: Sun, 21 Sep 2008 15:44:32 -0700
Subject: [PATCH] raid: make RAID autodetect default a KConfig optionRAID autodetect has the side effect of requiring synchronisation of all device drivers, which can make the boot several seconds longer (I've measured 7 on one of my laptops).... even for systems that don't have RAID setup for the root filesystem (the only FS where this matters).
Quoted 3 lines
This patch makes the default for autodetect a config option; either way the user can always override via the kernel command line.
Quoted 5 lines
Neil, if you agree with this patch, could you please send your Acked-by line? This patch depends on a clean-up in
init/do_mounts_md.cthat is in the fastboot tree so it would be logistically easier/better if we could queue this up towards upstream via tip/fastboot.Quoted 6 lines
Yes,
Acked-by NeilBrown <[email protected]>I'm not a big fan of autodetect in any case, and this patch seems to cover all the bases I can think of.
Quoted 6 lines
thanks
pushed togit://git.kernel.org/pub/scm/linux/kernel/git/arjan/linux-2.6-fastboot.git
masterIngo, please pull
pulled the commit below into tip/fastboot, thanks Arjan and Neil!
Ingo
---------------->
Quoted 1 line
From
da827bea62d62cabfe913e05fc05879faa614af8Mon Sep 17 00:00:00 2001
From: Arjan van de Ven <[email protected]>
Date: Sun, 21 Sep 2008 15:44:32 -0700
Subject: [PATCH] raid: make RAID autodetect default a KConfig option
RAID autodetect has the side effect of requiring synchronisation of all device drivers, which can make the boot several seconds longer (I've measured 7 on one of my laptops).... even for systems that don't have RAID setup for the root filesystem (the only FS where this matters).
This patch makes the default for autodetect a config option; either way the user can always override via the kernel command line.
--- drivers/md/Kconfig | 14 ++++++++++++++ init/do_mounts_md.c | 11 +++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-)
drivers/md/Kconfig +14 -0
@@ -30,6 +30,20 @@ config BLK_DEV_MD If unsure, say N. +config MD_AUTODETECT + bool "Autodetect RAID arrays during kernel boot" + depends on BLK_DEV_MD + default y + ---help--- + If you say Y here, then the kernel will try to autodetect raid + arrays as part of its boot process. + + If you don't use raid and say Y, this autodetection can cause + a several-second delay in the boot time due to various + synchronisation steps that are part of this step. + + If unsure, say Y. + config MD_LINEAR tristate "Linear (append) mode" depends on BLK_DEV_MD
init/do_mounts_md.c +9 -2
@@ -12,7 +12,12 @@* The code for that is here. */ -static int __initdata raid_noautodetect, raid_autopart; +#ifdef CONFIG_MD_AUTODETECT +static int __initdata raid_noautodetect; +#else +static int __initdata raid_noautodetect=1 ; +#endif +static int __initdata raid_autopart; static struct { int minor;
@@ -252,6 +257,8 @@ static int __init raid_setup(char *str)if (!strncmp (str,"noautodetect" , wlen)) raid_noautodetect =1 ; +if (!strncmp (str,"autodetect" , wlen)) + raid_noautodetect =0 ;if (strncmp (str,"partitionable" , wlen)==0 ) raid_autopart =1 ;if (strncmp (str,"part" , wlen)==0 )
@@ -288,7 +295,7 @@ void __init md_run_setup(void)create_dev ("/dev/md0" ,MKDEV (MD_MAJOR ,0 ));if (raid_noautodetect) -printk (KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=noautodetect)\n" ); +printk (KERN_INFO "md: Skipping autodetection of RAID arrays. (raid=autodetect will force)\n" );else autodetect_raid ();md_setup_drive ();