Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-11 Thread Sergey Senozhatsky
On (05/10/19 11:15), Petr Mladek wrote: [..] > arch/x86/kernel/smp.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > --- a/arch/x86/kernel/smp.c > +++ b/arch/x86/kernel/smp.c > @@ -124,7 +124,8 @@ static bool smp_no_nmi_ipi = false; > */ > static void

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-11 Thread Petr Mladek
On Thu 2019-05-09 18:43:12, Daniel Vetter wrote: > One thing to keep in mind is that the kernel is already dying, and > things will come crashing down later on This is important information. I havn't seen it mentioned earlier. > (I've seen this only in dmesg > tails capture in pstore in our CI,

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-10 Thread Daniel Vetter
On Fri, May 10, 2019 at 11:15 AM Petr Mladek wrote: > On Thu 2019-05-09 18:43:12, Daniel Vetter wrote: > > One thing to keep in mind is that the kernel is already dying, and > > things will come crashing down later on > > This is important information. I havn't seen it mentioned earlier. I

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-09 Thread Petr Mladek
On Thu 2019-05-09 14:09:03, Daniel Vetter wrote: > console_trylock, called from within printk, can be called from pretty > much anywhere. Including try_to_wake_up. Note that this isn't common, > usually the box is in pretty bad shape at that point already. But it > really doesn't help when then

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-09 Thread Daniel Vetter
On Thu, May 9, 2019 at 4:56 PM Petr Mladek wrote: > > On Thu 2019-05-09 14:09:03, Daniel Vetter wrote: > > console_trylock, called from within printk, can be called from pretty > > much anywhere. Including try_to_wake_up. Note that this isn't common, > > usually the box is in pretty bad shape at

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-09 Thread Peter Zijlstra
On Thu, May 09, 2019 at 03:06:09PM +0200, Daniel Vetter wrote: > On Thu, May 9, 2019 at 2:31 PM Peter Zijlstra wrote: > > On Thu, May 09, 2019 at 02:09:03PM +0200, Daniel Vetter wrote: > > > Fix this by creating a prinkt_safe_up() which calls wake_up_process > > > outside of the spinlock. This

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-09 Thread Daniel Vetter
On Thu, May 9, 2019 at 2:31 PM Peter Zijlstra wrote: > On Thu, May 09, 2019 at 02:09:03PM +0200, Daniel Vetter wrote: > > Fix this by creating a prinkt_safe_up() which calls wake_up_process > > outside of the spinlock. This isn't correct in full generality, but > > good enough for console_lock: >

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-09 Thread Chris Wilson
Quoting Daniel Vetter (2019-05-09 13:09:03) > console_trylock, called from within printk, can be called from pretty > much anywhere. Including try_to_wake_up. Note that this isn't common, > usually the box is in pretty bad shape at that point already. But it > really doesn't help when then lockdep

Re: [PATCH] RFC: console: hack up console_lock more v3

2019-05-09 Thread Peter Zijlstra
On Thu, May 09, 2019 at 02:09:03PM +0200, Daniel Vetter wrote: > Fix this by creating a prinkt_safe_up() which calls wake_up_process > outside of the spinlock. This isn't correct in full generality, but > good enough for console_lock: > > - console_lock doesn't use interruptible or killable or

[PATCH] RFC: console: hack up console_lock more v3

2019-05-09 Thread Daniel Vetter
console_trylock, called from within printk, can be called from pretty much anywhere. Including try_to_wake_up. Note that this isn't common, usually the box is in pretty bad shape at that point already. But it really doesn't help when then lockdep jumps in and spams the logs, potentially obscuring