lkml.org 
[lkml]   [2011]   [Dec]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: printk() vs tty_io
    From
    Date
    On Wed, 2011-12-14 at 10:43 +0000, Alan Cox wrote:
    > On Tue, 13 Dec 2011 15:52:35 -0800
    > Linus Torvalds <torvalds@linux-foundation.org> wrote:
    >
    > > On Tue, Dec 13, 2011 at 11:33 AM, Peter Zijlstra <peterz@infradead.org> wrote:
    > > >
    > > > I've been poking at reducing the constraints on printk(), like make it
    > > > work under rq->lock etc..
    > >
    > > You aren't supposed register a console that wakes things up. But the
    > > only console that honors that afaik is the traditional vt console.
    > > *Maybe* the network console, I didn't check.
    >
    > Serial console tries to be good as does netconsole.

    Well, this was the 8250 serial port driver doing wakeups. Its a simple
    on-board serial port,

    [ 29.797007] [<ffffffff8108a650>] __wake_up_common+0x4e/0x84
    [ 29.797007] [<ffffffff8108d6ea>] __wake_up+0x39/0x4d
    [ 29.797007] [<ffffffff8135d0db>] tty_wakeup+0x5b/0x60
    [ 29.797007] [<ffffffff81373fb9>] uart_write_wakeup+0x21/0x23
    [ 29.797007] [<ffffffff81376899>] transmit_chars+0xd8/0x12f
    [ 29.797007] [<ffffffff81377f3a>] serial8250_handle_port+0x2d9/0x2fd
    [ 29.797007] [<ffffffff81377fcb>] serial8250_handle_irq+0x16/0x1d
    [ 29.797007] [<ffffffff81377ff5>] serial8250_default_handle_irq+0x23/0x27
    [ 29.797007] [<ffffffff81377ade>] serial8250_interrupt+0x4d/0xc6
    [ 29.797007] [<ffffffff810c9ae8>] handle_irq_event_percpu+0xab/0x1fc
    [ 29.797007] [<ffffffff810c9c7a>] handle_irq_event+0x41/0x61
    [ 29.797007] [<ffffffff810cc4cd>] handle_edge_irq+0xd1/0xf6
    [ 29.797007] [<ffffffff8103ab85>] handle_irq+0x24/0x2f
    [ 29.797007] [<ffffffff8150acdd>] do_IRQ+0x4d/0xb3

    which places the wakeup under uport->lock, serial8250_console_write()
    takes uport->lock, under console_sem, connecting the locks.




    \
     
     \ /
      Last update: 2011-12-14 12:01    [W:0.067 / U:30.596 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site