linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: "Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org, benh@kernel.crashing.org,
	paulus@samba.org, mpe@ellerman.id.au,
	xinhui.pan@linux.vnet.ibm.com
Subject: Re: [PATCH] powerpc/xmon: add debugfs entry for xmon
Date: Tue, 14 Feb 2017 12:35:40 +1000	[thread overview]
Message-ID: <20170214123540.38b995cb@roar.ozlabs.ibm.com> (raw)
In-Reply-To: <1487019642-11411-1-git-send-email-gpiccoli@linux.vnet.ibm.com>

On Mon, 13 Feb 2017 19:00:42 -0200
"Guilherme G. Piccoli" <gpiccoli@linux.vnet.ibm.com> wrote:

> Currently the xmon debugger is set only via kernel boot command-line.
> It's disabled by default, and can be enabled with "xmon=on" on the
> command-line. Also, xmon may be accessed via sysrq mechanism, but once
> we enter xmon via sysrq,  it's  kept enabled until system is rebooted,
> even if we exit the debugger. A kernel crash will then lead to xmon
> instance, instead of triggering a kdump procedure (if configured), for
> example.
> 
> This patch introduces a debugfs entry for xmon, allowing user to query
> its current state and change it if desired. Basically, the "xmon" file
> to read from/write to is under the debugfs mount point, on powerpc
> directory. Reading this file will provide the current state of the
> debugger, one of the following: "on", "off", "early" or "nobt". Writing
> one of these states to the file will take immediate effect on the debugger.
> 
> Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
> ---
> * I had this patch partially done for some time, and after a discussion
> at the kernel slack channel latest week, I decided to rebase and fix
> some remaining bugs. I'd change 'x' option to always disable the debugger,
> since with this patch we can always re-enable xmon, but today I noticed
> Pan's patch on the mailing list, so perhaps his approach of adding a flag
> to 'x' option is preferable. I can change this in a V2, if requested.
> Thanks in advance!

xmon state changing after the first sysrq+x violates principle of least
astonishment, so I think that should be fixed.

Then the question is, is it worth making it runtime configurable with xmon
command or debugfs tunables?

Thanks,
Nick

  reply	other threads:[~2017-02-14  2:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 21:00 [PATCH] powerpc/xmon: add debugfs entry for xmon Guilherme G. Piccoli
2017-02-14  2:35 ` Nicholas Piggin [this message]
2017-02-14  3:58   ` Pan Xinhui
2017-02-14 11:41     ` Michael Ellerman
2017-02-14 17:35     ` Guilherme G. Piccoli
2017-02-14 23:50       ` Michael Ellerman
2017-02-15  3:52       ` panxinhui
2017-02-14 11:37 ` Michael Ellerman
2017-02-14 17:39   ` Guilherme G. Piccoli

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=20170214123540.38b995cb@roar.ozlabs.ibm.com \
    --to=npiggin@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=gpiccoli@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=xinhui.pan@linux.vnet.ibm.com \
    /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).