Re: [External] Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule()

2020-09-30 Thread Petr Mladek
On Mon 2020-09-28 12:25:59, Peter Zijlstra wrote: > On Mon, Sep 28, 2020 at 06:04:23PM +0800, Chengming Zhou wrote: > > > Well, you are lucky. So it's a problem in our printk implementation. > > Not lucky; I just kicked it in the groin really hard: > >

Re: [External] Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule()

2020-09-29 Thread Sergey Senozhatsky
On (20/09/29 17:09), Peter Zijlstra wrote: > > 2. The registration and unregistration of consoles should not longer > >be handled by console_lock (semaphore). It should be possible to > >call most consoles without a sleeping lock. It should remove all > >these deadlocks between

Re: [External] Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule()

2020-09-29 Thread Peter Zijlstra
On Tue, Sep 29, 2020 at 04:27:51PM +0200, Petr Mladek wrote: > Upstreaming the console handling will be the next big step. I am sure > that there will be long discussion about it. But there might be > few things that would help removing printk_deferred(). > > 1. Messages will be printed on

Re: [External] Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule()

2020-09-29 Thread Chengming Zhou
在 2020/9/28 下午5:01, Peter Zijlstra 写道: > On Mon, Sep 28, 2020 at 04:54:53PM +0800, Chengming Zhou wrote: >> 在 2020/9/28 下午3:32, Peter Zijlstra 写道: >>> On Mon, Sep 28, 2020 at 12:11:30AM +0800, Chengming Zhou wrote: The WARN_ON/WARN_ON_ONCE with rq lock held in __schedule() should be

Re: [External] Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule()

2020-09-28 Thread Sergey Senozhatsky
On (20/09/28 12:25), Peter Zijlstra wrote: [..] > > printk > >   vprintk_emit > >     console_unlock > >       vt_console_print > >         hide_cursor > >           bit_cursor > >             soft_cursor > >               queue_work_on > >                 __queue_work > >                  

Re: [External] Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule()

2020-09-28 Thread Peter Zijlstra
On Mon, Sep 28, 2020 at 06:04:23PM +0800, Chengming Zhou wrote: > Well, you are lucky. So it's a problem in our printk implementation. Not lucky; I just kicked it in the groin really hard: git://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git debug/experimental > The deadlock path