From: John Ogness <john.ogness@linutronix.de>
To: "Martin Hundebøll" <martin@geanix.com>, "Petr Mladek" <pmladek@suse.com>
Cc: "Steven Rostedt" <rostedt@goodmis.org>,
"Sergey Senozhatsky" <senozhatsky@chromium.org>,
linux-kernel@vger.kernel.org,
"Martin Hundebøll" <martin@geanix.com>
Subject: Re: [PATCH 2/2] reboot: flush printk buffers before final shutdown
Date: Tue, 31 Oct 2023 12:18:05 +0106 [thread overview]
Message-ID: <87edhbf3lm.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <20231030092432.3434623-2-martin@geanix.com>
On 2023-10-30, Martin Hundebøll <martin@geanix.com> wrote:
> Make sure printed messages are in fact printed before putting the system
> down.
>
> Signed-off-by: Martin Hundebøll <martin@geanix.com>
> ---
> kernel/reboot.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/reboot.c b/kernel/reboot.c
> index 3bba88c7ffc6..bab8350d5dae 100644
> --- a/kernel/reboot.c
> +++ b/kernel/reboot.c
> @@ -273,6 +273,7 @@ void kernel_restart(char *cmd)
> else
> pr_emerg("Restarting system with command '%s'\n", cmd);
> kmsg_dump(KMSG_DUMP_SHUTDOWN);
> + pr_flush(1000, false);
printk() tries to print directly from the calling context. Are you
experiencing problems where you do not see the restarting message?
John Ogness
next prev parent reply other threads:[~2023-10-31 11:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-30 9:24 [PATCH 1/2] printk: export pr_flush() Martin Hundebøll
2023-10-30 9:24 ` [PATCH 2/2] reboot: flush printk buffers before final shutdown Martin Hundebøll
2023-10-31 11:12 ` John Ogness [this message]
[not found] ` <8e31147e-f727-4354-8644-a4ff4b1431a4@geanix.com>
2023-10-31 15:16 ` John Ogness
2023-10-31 11:03 ` [PATCH 1/2] printk: export pr_flush() John Ogness
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=87edhbf3lm.fsf@jogness.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=martin@geanix.com \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=senozhatsky@chromium.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