linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* printk() vs tty_io
@ 2011-12-13 19:33 Peter Zijlstra
  2011-12-13 23:52 ` Linus Torvalds
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Peter Zijlstra @ 2011-12-13 19:33 UTC (permalink / raw)
  To: Greg KH, Theodore Ts'o, Linus Torvalds, Alan Cox
  Cc: linux-kernel, Ingo Molnar

Hi tty folks,

I've been poking at reducing the constraints on printk(), like make it
work under rq->lock etc..

Aside from a fwd port of the patch that abuses the console_sem.lock:
https://lkml.org/lkml/2011/6/9/298 and a few other not so very pretty
patches, I ran into the following lockdep splat (using a not so very
pretty lockdep early_printk() patch):

watchdog/0/10 is trying to acquire lock:
 ((console_sem).lock){-.-...}, at: 
but task is already holding lock:
 (&rt_rq->rt_runtime_lock){-.-...}, at: 
which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #5 (&rt_rq->rt_runtime_lock){-.-...}:
-> #4 (&rq->lock){-.-.-.}:
-> #3 (&p->pi_lock){-.-.-.}:
-> #2 (&tty->write_wait){-.-...}:
-> #1 (&port_lock_key){-.-...}:
-> #0 ((console_sem).lock){-.-...}:

It turns out that writing to a console does wakeups due to tty_io.c.

My question is basically, is there a feasible way around doing these
wakeups from the console::write() path? Everything I thought of was
really quite horrible... and very likely would break stuff since I'm not
that well versed in the whole tty thing.



^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2011-12-21 12:03 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-13 19:33 printk() vs tty_io Peter Zijlstra
2011-12-13 23:52 ` Linus Torvalds
2011-12-14  9:38   ` Peter Zijlstra
2011-12-14 10:43   ` Alan Cox
2011-12-14 10:56     ` Peter Zijlstra
2011-12-14 14:05       ` Ted Ts'o
2011-12-14 14:23         ` Peter Zijlstra
2011-12-14 15:54           ` Linus Torvalds
2011-12-15  9:56             ` Peter Zijlstra
2011-12-15 10:32               ` Alan Cox
2011-12-15 10:55                 ` Peter Zijlstra
2011-12-15 17:08               ` Linus Torvalds
2011-12-15 18:07                 ` Ingo Molnar
2011-12-15 21:22                 ` Alan Cox
2011-12-16 13:25                 ` Peter Zijlstra
2011-12-15 19:02               ` Greg KH
2011-12-14  6:59 ` Ingo Molnar
2011-12-14  9:40   ` [PATCH] arch, early_printk: Consolidate early_printk() implementations Peter Zijlstra
2011-12-14  9:41   ` [PATCH] lockdep: Enable earlyprintk output Peter Zijlstra
2011-12-14  9:43   ` printk() vs tty_io Peter Zijlstra
2011-12-14  9:46     ` Ingo Molnar
2011-12-21 12:03 ` Stijn Devriendt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).