public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Tejun Heo <tj@kernel.org>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Petr Mladek <pmladek@suse.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	linux-kernel@vger.kernel.org, kernel-team@fb.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/2] Subject: printk: Don't trap random context in infinite log_buf flush
Date: Tue, 7 Nov 2017 11:04:34 +0900	[thread overview]
Message-ID: <20171107020434.GC1822@jagdpanzerIV> (raw)
In-Reply-To: <20171107002254.GI3252168@devbig577.frc2.facebook.com>

Hi Tejun,

On (11/06/17 16:22), Tejun Heo wrote:
> Hello,
> 
> On Sat, Nov 04, 2017 at 01:24:08PM +0900, Sergey Senozhatsky wrote:
> > thanks for the patch set. we are currently looking at another approach:
> > lkml.kernel.org/r/20171102134515.6eef16de@gandalf.local.home
> > 
> > would you be interested in taking a look?
>  
> Hmm... It took some tweaking but the code at the end locks up the
> machine w/ Steven's patch applied and it's not that contrived a case
> (e.g. out of memory messages from packet tx/rx paths while OOM is in
> progress).

thanks!

just to make sure. there is a typo in Steven's patch:

	while (!READ_ONCE(console_waiter))

should be

	while (READ_ONCE(console_waiter))

is this the "tweaking" you are talking about?

> > there are some concerns, like a huge number of printk-s happening while
> > console_sem is locked. e.g. console_lock()/console_unlock() on one of the
> > CPUs, or console_lock(); printk(); ... printk(); console_unlock();
> 
> Unless we make all messages fully synchronous, I don't think there's a
> good solution for that and I don't think we wanna make everything
> fully synchronous.

this is where it becomes complicated. offloading logic is not binary,
unfortunately. we normally want to offload; but not always. things
like sysrq or late PM warnings, or kexec, etc. want to stay fully sync,
regardless the consequences. some of sysrq prints out even do
touch_nmi_watchdog() and touch_all_softlockup_watchdogs(). current
printk-kthread patch set tries to consider those cases and to avoid
any offloading.

	-ss

  reply	other threads:[~2017-11-07  2:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-02 13:51 [PATCH 1/2] printk: Relocate wake_klogd check close to the end of console_unlock() Tejun Heo
2017-11-02 13:52 ` [PATCH 2/2] Subject: printk: Don't trap random context in infinite log_buf flush Tejun Heo
2017-11-02 14:51   ` [PATCH TRIVIAL UPDATE 2/2] " Tejun Heo
2017-11-04  4:24   ` [PATCH 2/2] Subject: " Sergey Senozhatsky
2017-11-07  0:22     ` Tejun Heo
2017-11-07  2:04       ` Sergey Senozhatsky [this message]
2017-11-07 13:23         ` Tejun Heo
2017-11-08  5:29           ` Sergey Senozhatsky
2017-11-08 14:33             ` Tejun Heo
2017-11-08 16:22           ` Steven Rostedt
2017-11-08 16:28             ` Tejun Heo
2017-11-08 16:20       ` Steven Rostedt
2017-11-07  4:40 ` [PATCH 1/2] printk: Relocate wake_klogd check close to the end of console_unlock() 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=20171107020434.GC1822@jagdpanzerIV \
    --to=sergey.senozhatsky.work@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=kernel-team@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmladek@suse.com \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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