[lkml]   [2013]   [Feb]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [GIT PULL] printk: Support for full dynticks mode
On Tue, 2013-02-05 at 04:19 +0100, Frederic Weisbecker wrote:
> 2013/2/5 Steven Rostedt <>:
> > On Mon, 2013-02-04 at 18:09 -0800, Andrew Morton wrote:
> >
> >> Maybe there were other deadlock scenarios, dunno. That knowledge
> >> appears to be disappearing into the mists of time :(
> >
> > Discussing this on IRC with Frederic, he brought up that the
> > up(&console_sem) can do a wake_up as well. I guess that's the issue we
> > have :-/
> Also if we delay the wakeup on klogd but not on the console_sem
> waiters, it looks like a general printk() problem. Not something that
> only printk_sched() would like to avoid.

printk_sched() is a delay to printk() to avoid calling printk() which
might take the rq lock. It's to prevent printk() deadlocking in case it
wakes up. printk_sched() just delays the printk() to the next timer

The reason to avoid the wake up of klogd() is that it also grabs the
wait queue spinlock every time it's called. up() is fast when there's no
waiters, but wake_up_interruptible() is not so fast.

There's no issue calling wake_up_process() from printk() as long as you
don't do it while holding a rq lock.

-- Steve

 \ /
  Last update: 2013-02-05 05:01    [W:0.042 / U:1.644 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site