lkml.org 
[lkml]   [2011]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [debug patch] printk: Add a printk killswitch to robustify NMI watchdog messages
On 06.06.2011 18:17, Ingo Molnar wrote:
>
> * Peter Zijlstra<peterz@infradead.org> wrote:
>
>> On Mon, 2011-06-06 at 18:08 +0200, Ingo Molnar wrote:
>>> * Peter Zijlstra<peterz@infradead.org> wrote:
>>>
>>>> On Mon, 2011-06-06 at 17:52 +0200, Ingo Molnar wrote:
>>>>> * Peter Zijlstra<peterz@infradead.org> wrote:
>>>>>
>>>>>> Needs more staring at, preferably by someone who actually
>>>>>> understands that horrid mess :/ Also, this all still doesn't make
>>>>>> printk() work reliably while holding rq->lock.
>>>>>
>>>>> So, what about my suggestion to just *remove* the wakeup from there
>>>>> and use the deferred wakeup mechanism that klogd uses.
>>>>>
>>>>> That would make printk() *visibly* more robust in practice.
>>>>
>>>> That's currently done from the jiffy tick, do you want to effectively
>>>> delay releasing the console_sem for the better part of a jiffy?
>>>
>>> Yes, and we already do it in some other circumstances.
>>
>> We do?
>
> Yes, see the whole printk_pending logic, it delays:
>
> wake_up_interruptible(&log_wait);
>
> to the next jiffies tick.
>
>>> Can you see
>>> any problem with that? klogd is an utter slowpath anyway.
>>
>> but console_sem isn't klogd. We delay klogd and that's perfectly
>> fine, but afaict we don't delay console_sem.
>
> But console_sem is really a similar special case as klogd. See, it's
> about a *printk*. That's rare by definition.
>
> If someone on the console sees it he'll be startled by at least 10
> msecs ;-) So delaying the wakeup to the next jiffy really fits into
> the same approach as we already do with&log_wait, hm?

As long as it doesn't scramble the order of the messages, the delay
imho doesn't matter even in very printk-heavy debugging sessions.

>
> This would solve a real nightmare that has plagued us ever since
> printk() has done wakeups directly - i.e. like forever.
>
> Thanks,
>
> Ingo



\
 
 \ /
  Last update: 2011-06-06 18:41    [W:0.031 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site