Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1286406

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context

From Petr Mladek <pmladek@suse.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI context
Date 2015-12-08 12:30 +0100
Message-ID <qDoD0-1Hi-29@gated-at.bofh.it> (permalink)
References <qzp4E-243-71@gated-at.bofh.it> <qzpei-27s-15@gated-at.bofh.it> <qB2Qj-7Sl-27@gated-at.bofh.it> <qC0t5-4sT-49@gated-at.bofh.it> <qC2bw-5CT-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> Take the scenario where CPU1 is in the middle of a printk(), and is
> holding its lock.
> 
> CPU0 comes along and decides to trigger a NMI backtrace.  This sends
> a NMI to CPU1, which takes it in the middle of the serial console
> output.
> 
> With the existing solution, the NMI output will be written to the
> temporary buffer, and CPU1 has finished handling the NMI it resumes
> the serial console output, eventually dropping the lock.  That then
> allows CPU0 to print the contents of all buffers, and we get NMI
> printk output.
> 
> With this solution, as I understand it, we'll instead end up with
> CPU1's printk trying to output direct to the console, and although
> we've busted a couple of locks, we won't have busted the serial
> console locks, so CPU1 will deadlock - and that will stop any output
> what so ever.
> 
> If this is correct, then the net result is that we go from NMI with
> serial console producing output to NMI with serial console being
> less reliable at producing output.

You are right. I thought about it a lot and I think that the best
solution is to avoid this patch at all. I guess that it will make
Peter Zijlstra happy as well.

Best Regards,
Petr
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI  context Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-12-02 00:50 +0100
  Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI  context Petr Mladek <pmladek@suse.com> - 2015-12-04 16:30 +0100
    Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI  context Russell King - ARM Linux <linux@arm.linux.org.uk> - 2015-12-04 18:20 +0100
      RE: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in  NMI context David Laight <David.Laight@ACULAB.COM> - 2015-12-07 17:00 +0100
        Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI  context Petr Mladek <pmladek@suse.com> - 2015-12-08 15:50 +0100
      Re: [PATCH v2 3/5] printk/nmi: Try hard to print Oops message in NMI  context Petr Mladek <pmladek@suse.com> - 2015-12-08 12:30 +0100

csiph-web