From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933002AbcLGUrV (ORCPT ); Wed, 7 Dec 2016 15:47:21 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:50872 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932808AbcLGUrU (ORCPT ); Wed, 7 Dec 2016 15:47:20 -0500 Date: Wed, 7 Dec 2016 12:47:47 -0800 From: Andrew Morton To: Jungseung Lee Cc: Pierre Ossman , Al Viro , Christoph Hellwig , Adrian Bunk , linux-kernel@vger.kernel.org Subject: Re: [PATCH] init : Reduce rootwait polling interval time to 5ms Message-Id: <20161207124747.62043547ff990002b8e9b4ee@linux-foundation.org> In-Reply-To: <20161207060743.1728-1-js07.lee@samsung.com> References: <20161207060743.1728-1-js07.lee@samsung.com> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 07 Dec 2016 15:07:43 +0900 Jungseung Lee wrote: > For several devices, the rootwait time is sensitive because it directly > affects booting time. > The polling interval of rootwait is currently 100ms. > To save unnessesary waiting time, reduce the polling interval to 5 ms. > > ... > > --- a/init/do_mounts.c > +++ b/init/do_mounts.c > @@ -543,6 +543,8 @@ void __init mount_root(void) > #endif > } > > +#define ROOTWAIT_MSEC 5 > + > /* > * Prepare the namespace - decide what/where to mount, load ramdisks, etc. > */ > @@ -588,7 +590,7 @@ void __init prepare_namespace(void) > saved_root_name); > while (driver_probe_done() != 0 || > (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) > - msleep(100); > + msleep(ROOTWAIT_MSEC); > async_synchronize_full(); > } Fair enough. But I don't think the used-once #define adds any value, so let's go with the simple version? --- a/init/do_mounts.c~init-reduce-rootwait-polling-interval-time-to-5ms-fix +++ a/init/do_mounts.c @@ -543,8 +543,6 @@ void __init mount_root(void) #endif } -#define ROOTWAIT_MSEC 5 - /* * Prepare the namespace - decide what/where to mount, load ramdisks, etc. */ @@ -590,7 +588,7 @@ void __init prepare_namespace(void) saved_root_name); while (driver_probe_done() != 0 || (ROOT_DEV = name_to_dev_t(saved_root_name)) == 0) - msleep(ROOTWAIT_MSEC); + msleep(5); async_synchronize_full(); } _