linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
To: Russell Currey <ruscur@russell.cc>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH V2] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic
Date: Fri, 27 Nov 2015 16:12:25 +1100	[thread overview]
Message-ID: <5657E639.8050405@au1.ibm.com> (raw)
In-Reply-To: <1448421962-6174-1-git-send-email-ruscur@russell.cc>

On 25/11/15 14:26, Russell Currey wrote:
> On BMC machines, console output is controlled by the OPAL firmware and is
> only flushed when its pollers are called.  When the kernel is in a panic
> state, it no longer calls these pollers and thus console output does not
> completely flush, causing some output from the panic to be lost.
>
> This patch adds a new kmsg_dumper which gets called at panic time to ensure
> panic output is not lost.  It accomplishes this by calling OPAL_CONSOLE_FLUSH
> in the OPAL API, and if that is not available, the pollers are called enough
> times to (hopefully) completely flush the buffer.

As per our off-list discussions, the commit message should explain that 
the console is already flushed upon reboot, and thus this patch fixes a 
problem in the case where the kernel is not set to reboot on panic, or 
will only reboot after an extended delay. Additionally, you could still 
miss messages printed in panic() after the dumpers are called, i.e. the 
"end kernel panic" message.

>
> Signed-off-by: Russell Currey <ruscur@russell.cc>

The code looks reasonable.

With the changes I've mentioned above:

Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

-- 
Andrew Donnellan              Software Engineer, OzLabs
andrew.donnellan@au1.ibm.com  Australia Development Lab, Canberra
+61 2 6201 8874 (work)        IBM Australia Limited

  reply	other threads:[~2015-11-27  5:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-25  3:26 [PATCH V2] powerpc/powernv: Add a kmsg_dumper that flushes console output on panic Russell Currey
2015-11-27  5:12 ` Andrew Donnellan [this message]
2015-11-27  5:40 ` Stewart Smith
2015-11-27  6:15   ` Russell Currey
2015-11-27  7:21     ` Stewart Smith
2015-11-30  2:07       ` Russell Currey

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=5657E639.8050405@au1.ibm.com \
    --to=andrew.donnellan@au1.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=ruscur@russell.cc \
    /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).