On Mon, 2020-09-28 at 09:32 +0200, Peter Zijlstra wrote:
> 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
> > deferred by marking the PRINTK_DEFERRED_CONTEXT_MASK, or will cause
> > deadlock on rq lock in the printk path.
[]
> NAK printk_deferred is an abomination, kill that.

Didn't you introduce it?
Should you be complaining to yourself?

---

commit 3ccf3e8306156a28213adc720aba807e9a901ad5
Author: Peter Zijlstra <a.p.zijls...@chello.nl>
Date:   Mon Feb 27 10:47:00 2012 +0100

    printk/sched: Introduce special printk_sched() for those awkward moments
    
    There's a few awkward printk()s inside of scheduler guts that people
    prefer to keep but really are rather deadlock prone. Fudge around it
    by storing the text in a per-cpu buffer and poll it using the existing
    printk_tick() handler.
    
    This will drop output when its more frequent than once a tick, however
    only the affinity thing could possible go that fast and for that just
    one should suffice to notify the admin he's done something silly..
    
    Signed-off-by: Peter Zijlstra <a.p.zijls...@chello.nl>
    Cc: Linus Torvalds <torva...@linux-foundation.org>
    Cc: Andrew Morton <a...@linux-foundation.org>
    Link: http://lkml.kernel.org/n/tip-wua3lmkt3dg8nfts66o6b...@git.kernel.org
    Signed-off-by: Ingo Molnar <mi...@elte.hu>

commit aac74dc495456412c4130a1167ce4beb6c1f0b38
Author: John Stultz <john.stu...@linaro.org>
Date:   Wed Jun 4 16:11:40 2014 -0700

    printk: rename printk_sched to printk_deferred
    
    After learning we'll need some sort of deferred printk functionality in
    the timekeeping core, Peter suggested we rename the printk_sched function
    so it can be reused by needed subsystems.
    
    This only changes the function name. No logic changes.
    
    Signed-off-by: John Stultz <john.stu...@linaro.org>
    Reviewed-by: Steven Rostedt <rost...@goodmis.org>
    Cc: Jan Kara <j...@suse.cz>
    Cc: Peter Zijlstra <pet...@infradead.org>
    Cc: Jiri Bohac <jbo...@suse.cz>
    Cc: Thomas Gleixner <t...@linutronix.de>
    Cc: Ingo Molnar <mi...@redhat.com>
    Signed-off-by: Andrew Morton <a...@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torva...@linux-foundation.org>


Reply via email to