Re: IRQ off latency of printk is very high

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Matt Mackall <mpm@...>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...>, linux kernel <linux-kernel@...>, Ingo Molnar <mingo@...>, Jon Smirl <jonsmirl@...>
Date: Thursday, October 25, 2007 - 7:41 pm

Matt Mackall wrote:

Well, I need to do some more research.  This must be in
release_console_sem().  I was looking at vprintk, through
the ages.  At 2.6.16, it looked like this:

        spin_lock_irqsave(&logbuf_lock, flags);
        ...
              spin_unlock_irqrestore(&logbuf_lock, flags);
              console_may_schedule = 0;
              release_console_sem();

but the irq restore has been moving around to different places
in that function over the last few years.  I suspect that in the
common case the irqsave in vprintk is the one that disables
ints.

It appears that formerly interrupts were enabled in vprintk but
re-disabled immediately upon entering release_console_sem().
As it is now, they're held during formatting, buffering,
and output, which seems excessive.

It seems draconian to drain the entire buffer with ints disabled.
Is it possible to break this up and send out smaller chunks
at a time?  Maybe by putting a chunk loop in release_console_sem()?

Just an idea.  I can see that there are a lot of requirements
for this code, and the concurrency control has gotten
complex over the years.
 -- Tim

=============================
Tim Bird
Architecture Group Chair, CE Linux Forum
Senior Staff Engineer, Sony Corporation of America
=============================

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
IRQ off latency of printk is very high, Tim Bird, (Thu Oct 25, 3:44 pm)
Re: IRQ off latency of printk is very high, Mathieu Desnoyers, (Thu Oct 25, 6:28 pm)
Re: IRQ off latency of printk is very high, Tim Bird, (Thu Oct 25, 6:52 pm)
Re: IRQ off latency of printk is very high, Matt Mackall, (Thu Oct 25, 7:12 pm)
Re: IRQ off latency of printk is very high, Tim Bird, (Thu Oct 25, 7:41 pm)
Re: IRQ off latency of printk is very high, Pavel Machek, (Mon Oct 29, 2:54 pm)
Re: IRQ off latency of printk is very high, Mathieu Desnoyers, (Thu Nov 1, 11:27 am)
Re: IRQ off latency of printk is very high, Pavel Machek, (Thu Nov 1, 5:11 pm)
Re: IRQ off latency of printk is very high, Mathieu Desnoyers, (Thu Nov 1, 6:19 pm)
Re: IRQ off latency of printk is very high, Matt Mackall, (Thu Oct 25, 9:23 pm)
Re: IRQ off latency of printk is very high, Matt Mackall, (Thu Oct 25, 4:19 pm)
Re: IRQ off latency of printk is very high, Tim Bird, (Thu Oct 25, 5:15 pm)