Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761063AbYBZJEK (ORCPT ); Tue, 26 Feb 2008 04:04:10 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753366AbYBZJDu (ORCPT ); Tue, 26 Feb 2008 04:03:50 -0500 Received: from hu-out-0506.google.com ([72.14.214.225]:18009 "EHLO hu-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752638AbYBZJDq (ORCPT ); Tue, 26 Feb 2008 04:03:46 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=RMUtPr3L7yGddASY92Aw9LDQlsnkjEsscHPhkLE1FrPKIblvJDwzc6JATUYrJfFUDdWJtGyoNoMYfDeH6pqa06hSXGgtKjNFZPicattK8q/rY670Ieo0ul12IM4vVH2CArwVCmznjvbVT43mFEgk8CpnB1U06GqYY+rmVBmELhY= Date: Tue, 26 Feb 2008 17:09:48 +0800 From: Dave Young To: Randy Dunlap Cc: akpm , Dave Jones , Linux Kernel , Thomas Gleixner Subject: Re: boot_delay broken ? Message-ID: <20080226090948.GA2794@darkstar.te-china.tietoenator.com> References: <20080224004615.GA31012@codemonkey.org.uk> <20080225212251.18c4659e.randy.dunlap@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3724 Lines: 104 On Tue, Feb 26, 2008 at 01:59:31PM +0800, Dave Young wrote: > On Tue, Feb 26, 2008 at 1:48 PM, Dave Young wrote: > > On Tue, Feb 26, 2008 at 1:22 PM, Randy Dunlap wrote: > > > On Mon, 25 Feb 2008 10:14:36 +0800 Dave Young wrote: > > > > > > > On Sun, Feb 24, 2008 at 8:46 AM, Dave Jones wrote: > > > > > The boot_delay switch seems to be behaving strangely in the > > > > > current -git. Setting it to =10 makes the output 'bursty' > > > > > it becomes slow for some printk's whilst others scroll by > > > > > at regular speed. > > > > > Setting it any higher than that seems to make it pause for > > > > > a really long time before it outputs any text at all. > > > > > > > > On my side there's this issue for a long time > > > > http://lkml.org/lkml/2007/8/8/79 > > > > > > [http://marc.info/?l=linux-kernel&m=118655896515049&w=2] > > > > > > You asked questions and they were answered. Perhaps you didn't like > > > the answers. > > > > No, I like it. Thanks. > > > > But I still want to know why mdelay can not be used. > > is it not available for all archs or something else? > > > > > > > > > > Here's a question for you. What kernel boot options did you use? > > > Specifically, for lpj= and boot_delay= ? > > > > I tried boot_delay=100 and boot_delay=200 without lpj set, The result > > was really slow. It was better with lpj copied from dmesg, but was > > still slower then mdelay. > > Especially at the very beginning after the message "Booting the kernel", > I need to wait several minutes to see the afterwards messages > > > > > I think we can firstly use preset lpj, after delay calibrating just > > use the system lpj > > > > > > > > > > > > > > > > > > > x86 timer changes perhaps ? > > > > > > > > > --- > > > ~Randy > > > > > How about use loops_per_jiffy as following? With this patch at least for me the very long delay at the very begining does not occur. kernel/printk.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff -upr linux/kernel/printk.c linux.new/kernel/printk.c --- linux/kernel/printk.c 2008-02-26 16:54:23.000000000 +0800 +++ linux.new/kernel/printk.c 2008-02-26 16:59:02.000000000 +0800 @@ -173,24 +173,14 @@ __setup("log_buf_len=", log_buf_len_setu #ifdef CONFIG_BOOT_PRINTK_DELAY static unsigned int boot_delay; /* msecs delay after each printk during bootup */ -static unsigned long long printk_delay_msec; /* per msec, based on boot_delay */ static int __init boot_delay_setup(char *str) { - unsigned long lpj; - unsigned long long loops_per_msec; - - lpj = preset_lpj ? preset_lpj : 1000000; /* some guess */ - loops_per_msec = (unsigned long long)lpj / 1000 * HZ; - get_option(&str, &boot_delay); if (boot_delay > 10 * 1000) boot_delay = 0; - printk_delay_msec = loops_per_msec; - printk(KERN_DEBUG "boot_delay: %u, preset_lpj: %ld, lpj: %lu, " - "HZ: %d, printk_delay_msec: %llu\n", - boot_delay, preset_lpj, lpj, HZ, printk_delay_msec); + printk(KERN_DEBUG "boot_delay: %u\n", boot_delay); return 1; } __setup("boot_delay=", boot_delay_setup); @@ -199,6 +189,9 @@ static void boot_delay_msec(void) { unsigned long long k; unsigned long timeout; + unsigned long long printk_delay_msec; + + printk_delay_msec = (unsigned long long)loops_per_jiffy / 1000 * HZ; if (boot_delay == 0 || system_state != SYSTEM_BOOTING) return; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/