mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Faiyaz Mohammed <quic_faiyazm@quicinc.com>
To: 이동민 <ldmldm05@gmail.com>
Cc: <benjamin.bara@skidata.com>, <dmitry.osipenko@collabora.com>,
	<lee@kernel.org>, <daniel.lezcano@linaro.org>,
	<j.granados@samsung.com>, <linux-kernel@vger.kernel.org>,
	<dongmin.lee@linux.dev>
Subject: Re: [PATCH] kernel/reboot: enhance dmesg logging for system restart
Date: Wed, 19 Jun 2024 16:39:27 +0530	[thread overview]
Message-ID: <066a05ca-e2e8-4cfe-8d33-60a665495cdf@quicinc.com> (raw)
In-Reply-To: <CACmEs-4mntpn8SQVgx5Qv9W8cmWQ__=1ds_j=vXxcDp27=SXLA@mail.gmail.com>

Sorry for the delayed response.

On 6/7/2024 7:35 PM, 이동민 wrote:
> On Fri, Jun 7, 2024 at 7:59 PM Faiyaz Mohammed <quic_faiyazm@quicinc.com> wrote:
>>
>> It is useful to add the PID and Comm information along with command info.
>>
>> Currently, when system reboot kernel logs don not print PID and Comm:
>>
>> reboot: Restarting system with command 'reboot,scheduled_reboot'
>> reboot: Restarting system with command 'RescueParty'
>> reboot: Restarting system with command 'bootloader'
>> reboot: Restarting system with command 'recovery'
>> reboot: Restarting system with command 'userrequested,recovery’
>>
>> For Example after adding PID and Comm:
>>
>> reboot: PID: 1 Comm: init Restarting system with command 'shell'
>> reboot: PID: 1 Comm: init Restarting system with command 'bootloader'
> 
> Printing out PID and COMM information might be useful for getting
> which task is triggered system reboot. However, It's never a critical
> information that deserves printed with pr_emerg() to whoever want the
> system to be rebooted, unless the kernel is in a problematic
> situation.
> 
Agreed, It's not critical to print the process name which trigger reboot 
with pr_emerg(), so should it be OK if we add additional logging with 
reduced log level?

> If reboot is called by user space via reboot system call, reboot is
> never a problematic situation because it's user's intend in the
> kernel's view. Other kernel codes which invokes involuntary restart
> such as temperature overheat (drivers/memory/emif.c:622), already
> prints out the situation before invoking system_reboot(), hence, there
> is no reason to print out who called system_reboot().
> 
Agreed in kernel view user's space reboot is intended but if system is 
silently rebooting due to any user process(vendor specific user process 
or even a OS specific user deamon) meeting any error condition then a 
developer debugging the system need to know which user process is 
issuing reboot system call to debug further, so in humble opinion it is 
helpful for system debug perspective.

> Again, system reboot is not kernel panic, oops nor bug. If your intend
> is to debug the reboot handler's behavior more easily, just set a
> breakpoint for kernel_restart() function with gdb.
> 
> --
> Best Regards,
> Dongmin Lee
> 
> https://ldmsys.net/

  reply	other threads:[~2024-06-19 11:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-07 10:59 Faiyaz Mohammed
2024-06-07 14:05 ` 이동민
2024-06-19 11:09   ` Faiyaz Mohammed [this message]
2024-06-23  8:38     ` Dongmin Lee

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=066a05ca-e2e8-4cfe-8d33-60a665495cdf@quicinc.com \
    --to=quic_faiyazm@quicinc.com \
    --cc=benjamin.bara@skidata.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=dongmin.lee@linux.dev \
    --cc=j.granados@samsung.com \
    --cc=ldmldm05@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®