public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matt Mackall <mpm@selenic.com>
To: Tim Bird <tim.bird@am.sony.com>
Cc: linux kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Subject: Re: IRQ off latency of printk is very high
Date: Thu, 25 Oct 2007 15:19:48 -0500	[thread overview]
Message-ID: <20071025201948.GO17536@waste.org> (raw)
In-Reply-To: <4720F21F.9090404@am.sony.com>

On Thu, Oct 25, 2007 at 12:44:31PM -0700, Tim Bird wrote:
> I've been looking at 'IRQ off' latency in the Linux kernel, on
> version 2.6.22 for target using an ARM processor.
> I use a serial console, at 115200 bps.

Printk to the serial console uses polled I/O to get deterministic,
reliable, and -timely- output. If our very next statement (or interrupt)
may lock up the box, we want to be sure our printk has actually been
delivered before that happens.

Kindof a bummer for realtime, but also rather hard to get around.

> I've noticed that calls to printk disable interrupts for
> excessively long times.  I have a long test printk of
> over 200 chars, that holds interrupts off for 24 milliseconds.

2000bits @ 115200bps -> 17.4ms

> Are these are really needed, with all this other locking
> going on?  Any ideas for fixing this?

Well, we could have a commandline option that made messages with a
priority below X go out buffered. But it'd be a lousy default from a
debugging perspective.

-- 
Mathematics is the supreme nostalgia of our time.

  reply	other threads:[~2007-10-25 20:21 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25 19:44 IRQ off latency of printk is very high Tim Bird
2007-10-25 20:19 ` Matt Mackall [this message]
2007-10-25 21:15   ` Tim Bird
2007-10-25 22:28 ` Mathieu Desnoyers
2007-10-25 22:52   ` Tim Bird
2007-10-25 23:12     ` Matt Mackall
2007-10-25 23:41       ` Tim Bird
2007-10-26  1:23         ` Matt Mackall
2007-10-26 12:57           ` Benny Amorsen
2007-10-26 20:28             ` Matt Mackall
2007-10-29 18:54         ` Pavel Machek
2007-11-01 15:27           ` Mathieu Desnoyers
2007-11-01 21:11             ` Pavel Machek
2007-11-01 22:19               ` Mathieu Desnoyers

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=20071025201948.GO17536@waste.org \
    --to=mpm@selenic.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@redhat.com \
    --cc=tim.bird@am.sony.com \
    /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