Thread (9 messages) flat view 9 messages, 4 authors, 2017-02-15

Re: [PATCH] powerpc/xmon: add debugfs entry for xmon

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-02-14 23:50:32

"Guilherme G. Piccoli" [off-list ref] writes:
On 14/02/2017 01:58, Pan Xinhui wrote:
quoted
=E5=9C=A8 2017/2/14 10:35, Nicholas Piggin =E5=86=99=E9=81=93:
quoted
On Mon, 13 Feb 2017 19:00:42 -0200

xmon state changing after the first sysrq+x violates principle of least
astonishment, so I think that should be fixed.
hi, Nick
yes, as long as xmon is disabled during boot, it should still be disable=
d after existing xmon.
quoted
My patch does not fix that as it need people add one more char 'z' follo=
wing 'x'.
quoted
I will provide a new patch to fix that.
=20
quoted
Then the question is, is it worth making it runtime configurable with x=
mon
quoted
quoted
command or debugfs tunables?
They are options for people to turn xmon features on or off. Maybe peopl=
e needn't this.
quoted
However I am not a fan  of debugfs this time as I am used to using xmon =
cmds. :)
quoted
=20
Hi, Guilherme
So in the end, my thought is that: 1) cmd x|X will exit xmon and keep xm=
on in the original state(indicated by var xmon_off).
quoted
2) Then add options to turn some features on/off. And debugfs maybe not =
fit for this. But I am also wondering at same time, are people needing this?
Hi Nick and Xinhui, thanks very much for the feedback.
I agree, we should keep xmon in the state it was firstly set, on boot
time - dropping to the debugger using sysrq shouldn't change it.

Now, the use case of the debugfs approach is to allow user to
enable/disable xmon without need to drop into the debugger itself, or
reboot the machine.
Imagine a scenario in which we have a production machine, and:


i) For some reason, somebody kept xmon enabled on grub.cfg and now, we
want to let kdump work in case of crash - how to disable xmon in runtime?

ii) The opposite: xmon wasn't enable on boot time in production machine,
but we have a super-rare issue and want to drop to xmon next time it
happens, so we need to enable it. But we don't want to drop into the
debugger to force it gets enabled, so how do we enable it?
Yep. I think both of those are good reasons to add a debugfs file.
Regarding the place of the xmon state file, I believe debugfs is the
right place - where else could we add it? procfs? configfs?
debugfs, under powerpc_debugfs_root.

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help