public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Arjan van de Ven <arjan@infradead.org>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu, fweisbec@gmail.com,
	linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org,
	linux-acpi@vger.kernel.org, akpm@linux-foundation.org
Subject: Re: [PATCH 0/4] Fastboot revisited: Asynchronous function calls
Date: Sun, 4 Jan 2009 10:16:57 -0800 (PST)	[thread overview]
Message-ID: <alpine.LFD.2.00.0901041009060.3179@localhost.localdomain> (raw)
In-Reply-To: <20090104092430.7ffd2c41@infradead.org>



On Sun, 4 Jan 2009, Arjan van de Ven wrote:
> 
> To see this working, I uploaded a "before" and "after" kernel bootchart
> for one of my testboxes at
> 
> http://www.fenrus.org/linux/before.svg
> http://www.fenrus.org/linux/after.svg

Ok, so why does the serial port init take so long? That's a quarter of a 
second for you, which is ridiculous.

I _think_ it's the irq auto-probing, but that's just a guess. The 8250 
driver does some historical crud, like

	probe_irq_off(probe_irq_on());

to get rid of any pending irq's, but that should be entirely pointless 
these days. I bet that line basically goes back to pre-history, before we 
made the auto-probing much stabler.

The irq auto-probing itself also has a few excessive delays, like waiting 
for 0.1 s just to wait for spurious interrupts to trigger. Doing the extra 
unnecessary probe makes that doubly expensive.

Does this patch make any difference to you? I'm not at all sure that it's 
the irq probing, but if it is, then this should make the serial probe go 
much faster.

		Linus

---
 drivers/serial/8250.c  |    1 -
 kernel/irq/autoprobe.c |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index daa0056..436372e 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1259,7 +1259,6 @@ static void autoconfig_irq(struct uart_8250_port *up)
 	}
 
 	/* forget possible initially masked and pending IRQ */
-	probe_irq_off(probe_irq_on());
 	save_mcr = serial_inp(up, UART_MCR);
 	save_ier = serial_inp(up, UART_IER);
 	serial_outp(up, UART_MCR, UART_MCR_OUT1 | UART_MCR_OUT2);
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c
index cc0f732..e272784 100644
--- a/kernel/irq/autoprobe.c
+++ b/kernel/irq/autoprobe.c
@@ -60,7 +60,7 @@ unsigned long probe_irq_on(void)
 	}
 
 	/* Wait for longstanding interrupts to trigger. */
-	msleep(20);
+	msleep(10);
 
 	/*
 	 * enable any unassigned irqs
@@ -80,7 +80,7 @@ unsigned long probe_irq_on(void)
 	/*
 	 * Wait for spurious interrupts to trigger
 	 */
-	msleep(100);
+	msleep(10);
 
 	/*
 	 * Now filter out any obviously spurious interrupts

  parent reply	other threads:[~2009-01-04 18:17 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-04 17:24 [PATCH 0/4] Fastboot revisited: Asynchronous function calls Arjan van de Ven
2009-01-04 17:28 ` [PATCH 1/4] fastboot: Asynchronous function calls to speed up kernel boot Arjan van de Ven
2009-01-04 18:33   ` Linus Torvalds
2009-01-04 18:40     ` Arjan van de Ven
2009-01-04 18:49     ` Arjan van de Ven
2009-01-04 19:05   ` Andi Kleen
2009-01-04 19:09     ` Arjan van de Ven
2009-01-04 19:49       ` Andi Kleen
2009-01-04 19:52         ` Andrew Morton
2009-01-04 17:29 ` [PATCH 2/4] fastboot: make scsi probes asynchronous Arjan van de Ven
2009-01-04 18:05   ` Matthew Wilcox
2009-01-04 18:13     ` Arjan van de Ven
2009-01-04 18:38       ` Jaswinder Singh Rajput
2009-01-04 18:44         ` Arjan van de Ven
2009-01-04 17:30 ` [PATCH 3/4] fastboot: make the libata port scan asynchronous Arjan van de Ven
2009-01-04 17:31 ` [PATCH 4/4] fastboot: make ACPI bus drivers probe asynchronous Arjan van de Ven
2009-01-05  2:03   ` Zhao Yakui
2009-01-05  1:58     ` Arjan van de Ven
2009-01-05  2:51       ` Zhao Yakui
2009-01-05  2:51         ` Arjan van de Ven
2009-01-05  5:30           ` Zhao Yakui
2009-01-04 18:16 ` Linus Torvalds [this message]
2009-01-04 18:31   ` [PATCH 0/4] Fastboot revisited: Asynchronous function calls Arjan van de Ven
2009-01-04 18:54     ` Linus Torvalds
2009-01-04 19:05       ` Arjan van de Ven
2009-01-04 19:11         ` Linus Torvalds
2009-01-04 19:19           ` Arjan van de Ven
2009-01-05 16:21         ` Alan Cox
2009-01-05 21:13           ` Arjan van de Ven
2009-01-05 21:21             ` Linus Torvalds
2009-01-04 19:11       ` Andi Kleen
2009-01-04 19:46         ` Robert Hancock
2009-01-04 19:27   ` Linus Torvalds
2009-01-04 19:48     ` Arjan van de Ven
2009-01-04 21:44   ` Alan Cox
2009-01-11 13:14   ` Pavel Machek
2009-01-05  6:01 ` Nigel Cunningham
2009-01-05  8:47   ` Frederic Weisbecker
2009-01-05 10:53   ` Arjan van de Ven
2009-01-05 11:18     ` Nigel Cunningham
2009-01-07  2:41     ` Shaohua Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.0901041009060.3179@localhost.localdomain \
    --to=torvalds@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=arjan@infradead.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox