linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Peter Zijlstra <peterz@infradead.org>,
	Chengming Zhou <zhouchengming@bytedance.com>
Cc: linux-kernel@vger.kernel.org, pmladek@suse.com,
	sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
	mingo@redhat.com, juri.lelli@redhat.com,
	vincent.guittot@linaro.org, dietmar.eggemann@arm.com,
	bsegall@google.com, mgorman@suse.de, songmuchun@bytedance.com
Subject: Re: [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule()
Date: Mon, 28 Sep 2020 00:52:44 -0700	[thread overview]
Message-ID: <0e8e87e25c90339fe790252626855cbb47bc2c08.camel@perches.com> (raw)
In-Reply-To: <20200928073202.GA2611@hirez.programming.kicks-ass.net>

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.zijlstra@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.zijlstra@chello.nl>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Link: http://lkml.kernel.org/n/tip-wua3lmkt3dg8nfts66o6brne@git.kernel.org
    Signed-off-by: Ingo Molnar <mingo@elte.hu>

commit aac74dc495456412c4130a1167ce4beb6c1f0b38
Author: John Stultz <john.stultz@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.stultz@linaro.org>
    Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Jiri Bohac <jbohac@suse.cz>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>



  reply	other threads:[~2020-09-28  7:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-27 16:11 [PATCH 1/2] printk: Add printk_deferred_{enter, exit} Chengming Zhou
2020-09-27 16:11 ` [PATCH 2/2] sched: mark PRINTK_DEFERRED_CONTEXT_MASK in __schedule() Chengming Zhou
2020-09-28  7:32   ` Peter Zijlstra
2020-09-28  7:52     ` Joe Perches [this message]
2020-09-28  8:00       ` Peter Zijlstra
2020-09-28  8:06         ` Peter Zijlstra
2020-09-28  8:54     ` [External] " Chengming Zhou
2020-09-28  9:01       ` Peter Zijlstra
2020-09-28 10:04         ` Chengming Zhou
2020-09-28 10:25           ` Peter Zijlstra
2020-09-28 23:50             ` Sergey Senozhatsky
2020-09-29 14:27             ` Petr Mladek
2020-09-29 15:09               ` Peter Zijlstra
2020-09-30  0:48                 ` Sergey Senozhatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0e8e87e25c90339fe790252626855cbb47bc2c08.camel@perches.com \
    --to=joe@perches.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=songmuchun@bytedance.com \
    --cc=vincent.guittot@linaro.org \
    --cc=zhouchengming@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).