From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-17 16:39:37
On 17/05/2022 10:28, Petr Mladek wrote:
[...]
quoted
quoted
Disagree here. I'm looping Google maintainers, so they can comment.
(CCed Evan, David, Julius)
This notifier is clearly a hypervisor notification mechanism. I've fixed
a locking stuff there (in previous patch), I feel it's low-risk but even
if it's mid-risk, the class of such callback remains a perfect fit with
the hypervisor list IMHO.
This logs a panic to our "eventlog", a tiny logging area in SPI flash
for critical and power-related events. In some cases this ends up
being the only clue we get in a Chromebook feedback report that a
panic occurred, so from my perspective moving it to the front of the
line seems like a good idea.
IMHO, this would really better fit into the pre-reboot notifier list:
+ the callback stores the log so it is similar to kmsg_dump()
or console_flush_on_panic()
+ the callback should be proceed after "info" notifiers
that might add some other useful information.
Honestly, I am not sure what exactly hypervisor callbacks do. But I
think that they do not try to extract the kernel log because they
would need to handle the internal format.
I guess the main point in your response is : "I am not sure what exactly
hypervisor callbacks do". We need to be sure about the semantics of such
list, and agree on that.
So, my opinion about this first list, that we call "hypervisor list",
is: it contains callbacks that
(1) should run early, preferably before kdump (or even if kdump isn't
set, should run ASAP);
(2) these callbacks perform some communication with an abstraction that
runs "below" the kernel, like a firmware or hypervisor. Classic example:
pvpanic, that communicates with VMM (usually qemu) and allow such VMM to
snapshot the full guest memory, for example.
(3) Should be low-risk. What defines risk is the level of reliability of
subsequent operations - if the callback have 50% of chance of "bricking"
the system totally and prevent kdump / kmsg_dump() / reboot , this is
high risk one for example.
Some good fits IMO: pvpanic, sstate_panic_event() [sparc], fadump in
powerpc, etc.
So, this is a good case for the Google notifier as well - it's not
collecting data like the dmesg (hence your second bullet seems to not
apply here, info notifiers won't add info to be collected by gsmi). It
is a firmware/hypervisor/whatever-gsmi-is notification mechanism, that
tells such "lower" abstraction a panic occurred. It seems low risk and
we want it to run ASAP, if possible.
So, I'd like to keep it here, unless gsmi maintainers disagree or I'm
perhaps misunderstanding the meaning of this first list.
Cheers,
Guilherme
[... snip ...]
It seems to reset some hardware or so. IMHO, it should go into the
pre-reboot list.
Mixed feelings here, I'm looping Broadcom maintainers to comment.
(CC Scott and Broadcom list)
I'm afraid it breaks kdump if this device is not reset beforehand - it's
a doorbell write, so not high risk I think...
But in case the not-reset device can be probed normally in kdump kernel,
then I'm fine in moving this to the reboot list! I don't have the HW to
test myself.
Good question. Well, it if has to be called before kdump then
even "hypervisor" list is a wrong place because is not always
called before kdump.
Agreed! I'll defer that to Scott and Broadcom folks to comment.
If it's not strictly necessary, I'll happily move it to the reboot list.
If necessary, we could use the machine_crash_kexec() approach, but we'll
fall into the case arm64 doesn't support it and I'm not sure if this
device is available for arm - again a question for the maintainers.
[...]
This is setting a variable only, and once it's set (data->kernel_panic
is the bool's name), it just bails out the IRQ handler and a timer
setting - this timer seems kinda tricky, so bailing out ASAP makes sense
IMHO.
IMHO, the timer informs the hardware that the system is still alive
in the middle of panic(). If the timer is not working then the
hardware (chip) will think that the system frozen in panic()
and will power off the system. See the comments in
drivers/power/reset/ltc2952-poweroff.c:
[.... snip ...]
IMHO, we really have to keep it alive until we reach the reboot stage.
Another question is how it actually works when the interrupts are
disabled during panic() and the timer callbacks are not handled.
Agreed here! Guess I can move this one the reboot list, fine by me.
Unless PM folks think otherwise.
[...]
quoted
Disagree here, I'm CCing Florian for information.
This notifier preserves RAM so it's *very interesting* if we have
kmsg_dump() for example, but maybe might be also relevant in case kdump
kernel is configured to store something in a persistent RAM (then,
without this notifier, after kdump reboots the system data would be lost).
I see. It is actually similar problem as with
drivers/firmware/google/gsmi.c.
I does similar things like kmsg_dump() so it should be called in
the same location (after info notifier list and before kdump).
A solution might be to put it at these notifiers at the very
end of the "info" list or make extra "dump" notifier list.
Here I still disagree. I've commented in the other response thread
(about Google gsmi) about the semantics of the hypervisor list, but
again: this list should contain callbacks that
(a) Should run early, _by default_ before a kdump;
(b) Communicate with the firmware/hypervisor in a "low-risk" way;
Imagine a scenario where users configure kdump kernel to save something
in a persistent form in DRAM - it'd be like a late pstore, in the next
kernel. This callback enables that, it's meant to inform FW "hey, panic
happened, please from now on don't clear the RAM in the next FW-reboot".
I don't see a reason to postpone that - let's see if the maintainers
have an opinion.
Cheers,
Guilherme
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-17 16:46:55
On 17/05/2022 11:11, Petr Mladek wrote:
[...]
quoted
quoted
Then notifiers could make an informed choice on whether to deep dive to
get all the possible details (when there is no kdump) or just skim the high
level stuff (to maximize chance of getting a successful kdump).
-Tony
Good idea Tony! What if I wire a kexec_crash_loaded() in the notifier?
I like this idea.
One small problem is that kexec_crash_loaded() has valid result
only under kexec_mutex. On the other hand, it should stay true
once loaded so that the small race window should be innocent.
quoted
With that, are you/Petr/Dinh OK in moving it for the info list?
Sounds good to me.
Best Regards,
Petr
Perfect, I'll do that for V2 then =)
Tony / Dinh - can I just *skip* this notifier *if kdump* is set or else
we run the code as-is? Does that make sense to you?
I'll postpone it to run almost in the end of info list (last position is
for panic_print).
Thanks,
Guilherme
Tony / Dinh - can I just *skip* this notifier *if kdump* is set or else
we run the code as-is? Does that make sense to you?
The "skip" option sounds like it needs some special flag associated with
an entry on the notifier chain. But there are other notifier chains ... so that
sounds messy to me.
Just all the notifiers in priority order. If any want to take different actions
based on kdump status, change the code. That seems more flexible than
an "all or nothing" approach by skipping.
-Tony
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-17 18:14:38
On 17/05/2022 14:02, Luck, Tony wrote:
quoted
Tony / Dinh - can I just *skip* this notifier *if kdump* is set or else
we run the code as-is? Does that make sense to you?
The "skip" option sounds like it needs some special flag associated with
an entry on the notifier chain. But there are other notifier chains ... so that
sounds messy to me.
Just all the notifiers in priority order. If any want to take different actions
based on kdump status, change the code. That seems more flexible than
an "all or nothing" approach by skipping.
-Tony
I guess I've expressed myself in a poor way - sorry!
What I'm planning to do in the altera_edac notifier is:
if (kdump_is_set)
return;
/* regular code */
In other words: if the kdump is set, this notifier will be effectively a
nop (although it's gonna be called).
Lemme know your thoughts Tony, if that makes sense.
Thanks,
Guilherme
From: Petr Mladek <pmladek@suse.com> Date: 2022-05-18 07:34:21
On Tue 2022-05-17 13:37:58, Guilherme G. Piccoli wrote:
On 17/05/2022 10:28, Petr Mladek wrote:
quoted
[...]
quoted
quoted
Disagree here. I'm looping Google maintainers, so they can comment.
(CCed Evan, David, Julius)
This notifier is clearly a hypervisor notification mechanism. I've fixed
a locking stuff there (in previous patch), I feel it's low-risk but even
if it's mid-risk, the class of such callback remains a perfect fit with
the hypervisor list IMHO.
This logs a panic to our "eventlog", a tiny logging area in SPI flash
for critical and power-related events. In some cases this ends up
> >> being the only clue we get in a Chromebook feedback report that a
quoted
quoted
panic occurred, so from my perspective moving it to the front of the
line seems like a good idea.
IMHO, this would really better fit into the pre-reboot notifier list:
+ the callback stores the log so it is similar to kmsg_dump()
or console_flush_on_panic()
+ the callback should be proceed after "info" notifiers
that might add some other useful information.
Honestly, I am not sure what exactly hypervisor callbacks do. But I
think that they do not try to extract the kernel log because they
would need to handle the internal format.
I guess the main point in your response is : "I am not sure what exactly
hypervisor callbacks do". We need to be sure about the semantics of such
list, and agree on that.
So, my opinion about this first list, that we call "hypervisor list",
is: it contains callbacks that
(1) should run early, preferably before kdump (or even if kdump isn't
set, should run ASAP);
(2) these callbacks perform some communication with an abstraction that
runs "below" the kernel, like a firmware or hypervisor. Classic example:
pvpanic, that communicates with VMM (usually qemu) and allow such VMM to
snapshot the full guest memory, for example.
(3) Should be low-risk. What defines risk is the level of reliability of
subsequent operations - if the callback have 50% of chance of "bricking"
the system totally and prevent kdump / kmsg_dump() / reboot , this is
high risk one for example.
Some good fits IMO: pvpanic, sstate_panic_event() [sparc], fadump in
powerpc, etc.
So, this is a good case for the Google notifier as well - it's not
collecting data like the dmesg (hence your second bullet seems to not
apply here, info notifiers won't add info to be collected by gsmi). It
is a firmware/hypervisor/whatever-gsmi-is notification mechanism, that
tells such "lower" abstraction a panic occurred. It seems low risk and
we want it to run ASAP, if possible.
"
quoted
quoted
This logs a panic to our "eventlog", a tiny logging area in SPI flash
for critical and power-related events. In some cases this ends up
I see. I somehow assumed that it was about the kernel log because
Evans wrote:
"This logs a panic to our "eventlog", a tiny logging area in SPI flash
for critical and power-related events. In some cases this ends up"
Anyway, I would distinguish it the following way.
+ If the notifier is preserving kernel log then it should be ideally
treated as kmsg_dump().
+ It the notifier is saving another debugging data then it better
fits into the "hypervisor" notifier list.
Regarding the reliability. From my POV, any panic notifier enabled
in a generic kernel should be reliable with more than 99,9%.
Otherwise, they should not be in the notifier list at all.
An exception would be a platform-specific notifier that is
called only on some specific platform and developers maintaining
this platform agree on this.
The value "99,9%" is arbitrary. I am not sure if it is realistic
even in the other code, for example, console_flush_on_panic()
or emergency_restart(). I just want to point out that the border
should be rather high. Otherwise we would back in the situation
where people would want to disable particular notifiers.
Best Regards,
Petr
From: Petr Mladek <pmladek@suse.com> Date: 2022-05-18 07:39:01
On Tue 2022-05-17 13:42:06, Guilherme G. Piccoli wrote:
On 17/05/2022 10:57, Petr Mladek wrote:
quoted
quoted
Disagree here, I'm CCing Florian for information.
This notifier preserves RAM so it's *very interesting* if we have
kmsg_dump() for example, but maybe might be also relevant in case kdump
kernel is configured to store something in a persistent RAM (then,
without this notifier, after kdump reboots the system data would be lost).
I see. It is actually similar problem as with
drivers/firmware/google/gsmi.c.
I does similar things like kmsg_dump() so it should be called in
the same location (after info notifier list and before kdump).
A solution might be to put it at these notifiers at the very
end of the "info" list or make extra "dump" notifier list.
Here I still disagree. I've commented in the other response thread
(about Google gsmi) about the semantics of the hypervisor list, but
again: this list should contain callbacks that
(a) Should run early, _by default_ before a kdump;
(b) Communicate with the firmware/hypervisor in a "low-risk" way;
Imagine a scenario where users configure kdump kernel to save something
in a persistent form in DRAM - it'd be like a late pstore, in the next
kernel. This callback enables that, it's meant to inform FW "hey, panic
happened, please from now on don't clear the RAM in the next FW-reboot".
I don't see a reason to postpone that - let's see if the maintainers
have an opinion.
I have answered this in more detail in the other reply, see
https://lore.kernel.org/r/YoShZVYNAdvvjb7z@alley
I agree that both notifiers in
drivers/soc/bcm/brcmstb/pm/pm-arm.c
drivers/firmware/google/gsmi.c
better fit into the hypervisor list after all.
Best Regards,
Petr
@@ -814,7 +814,7 @@ static int brcmstb_pm_probe(struct platform_device *pdev)gotoout;}-atomic_notifier_chain_register(&panic_notifier_list,+atomic_notifier_chain_register(&panic_hypervisor_list,&brcmstb_pm_panic_nb);
I am not sure about this one. It instruct some HW to preserve DRAM.
IMHO, it better fits into pre_reboot category but I do not have
strong opinion.
Disagree here, I'm CCing Florian for information.
This notifier preserves RAM so it's *very interesting* if we have
kmsg_dump() for example, but maybe might be also relevant in case kdump
kernel is configured to store something in a persistent RAM (then,
without this notifier, after kdump reboots the system data would be lost).
I see. It is actually similar problem as with
drivers/firmware/google/gsmi.c.
As discussed in the other other reply, it seems that both affected
notifiers do not store kernel logs and should stay in the "hypervisor".
I does similar things like kmsg_dump() so it should be called in
the same location (after info notifier list and before kdump).
A solution might be to put it at these notifiers at the very
end of the "info" list or make extra "dump" notifier list.
I just want to point out that the above idea has problems.
Notifiers storing kernel log need to be treated as kmsg_dump().
In particular, we would need to know if there are any.
We do not need to call "info" notifier list before kdump
when there is no kernel log dumper registered.
Best Regards,
Petr
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-18 13:10:46
On 18/05/2022 04:38, Petr Mladek wrote:
[...]
I have answered this in more detail in the other reply, see
https://lore.kernel.org/r/YoShZVYNAdvvjb7z@alley
I agree that both notifiers in
drivers/soc/bcm/brcmstb/pm/pm-arm.c
drivers/firmware/google/gsmi.c
better fit into the hypervisor list after all.
Best Regards,
Petr
Perfect, thanks - will keep both in such list for V2.
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-18 13:17:34
On 18/05/2022 04:58, Petr Mladek wrote:
[...]
quoted
I does similar things like kmsg_dump() so it should be called in
the same location (after info notifier list and before kdump).
A solution might be to put it at these notifiers at the very
end of the "info" list or make extra "dump" notifier list.
I just want to point out that the above idea has problems.
Notifiers storing kernel log need to be treated as kmsg_dump().
In particular, we would need to know if there are any.
We do not need to call "info" notifier list before kdump
when there is no kernel log dumper registered.
Notifiers respect the priority concept, which is just a number that
orders the list addition (and the list is called in order).
I've used the last position to panic_print() [in patch 25] - one idea
here is to "reserve" the last position (represented by INT_MIN) for
notifiers that act like kmsg_dump(). I couldn't find any IIRC, but that
doesn't prevent us to save this position and comment about that.
Makes sense to you ?
Cheers!
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-18 13:26:46
On 18/05/2022 04:33, Petr Mladek wrote:
[...]
Anyway, I would distinguish it the following way.
+ If the notifier is preserving kernel log then it should be ideally
treated as kmsg_dump().
+ It the notifier is saving another debugging data then it better
fits into the "hypervisor" notifier list.
Definitely, I agree - it's logical, since we want more info in the logs,
and happens some notifiers running in the informational list do that,
like ftrace_on_oops for example.
Regarding the reliability. From my POV, any panic notifier enabled
in a generic kernel should be reliable with more than 99,9%.
Otherwise, they should not be in the notifier list at all.
An exception would be a platform-specific notifier that is
called only on some specific platform and developers maintaining
this platform agree on this.
The value "99,9%" is arbitrary. I am not sure if it is realistic
even in the other code, for example, console_flush_on_panic()
or emergency_restart(). I just want to point out that the border
should be rather high. Otherwise we would back in the situation
where people would want to disable particular notifiers.
Totally agree, these percentages are just an example, 50% is ridiculous
low reliability in my example heheh
But some notifiers deep dive in abstraction layers (like regmap or GPIO
stuff) and it's hard to determine the probability of a lock issue (take
a spinlock already taken inside regmap code and live-lock forever, for
example). These are better to run, if possible, later than kdump or even
info list.
Thanks again for the good analysis Petr!
Cheers,
Guilherme
[... snip ...]
It seems to reset some hardware or so. IMHO, it should go into the
pre-reboot list.
Mixed feelings here, I'm looping Broadcom maintainers to comment.
(CC Scott and Broadcom list)
I'm afraid it breaks kdump if this device is not reset beforehand - it's
a doorbell write, so not high risk I think...
But in case the not-reset device can be probed normally in kdump kernel,
then I'm fine in moving this to the reboot list! I don't have the HW to
test myself.
Good question. Well, it if has to be called before kdump then
even "hypervisor" list is a wrong place because is not always
called before kdump.
Agreed! I'll defer that to Scott and Broadcom folks to comment.
If it's not strictly necessary, I'll happily move it to the reboot list.
If necessary, we could use the machine_crash_kexec() approach, but we'll
fall into the case arm64 doesn't support it and I'm not sure if this
device is available for arm - again a question for the maintainers.
We register to the panic notifier so that we can kill the VK card ASAP
to stop DMAing things over to the host side. If it is not notified then
memory may not be frozen when kdump is occurring.
Notifying the card on panic is also needed to allow for any type of
reset to occur.
So, the only thing preventing moving the notifier later is the chance
that memory is modified while kdump is occurring. Or, if DMA is
disabled before kdump already then this wouldn't be an issue and the
notification to the card (to allow for clean resets) can be done later.
[...]
This is setting a variable only, and once it's set (data->kernel_panic
is the bool's name), it just bails out the IRQ handler and a timer
setting - this timer seems kinda tricky, so bailing out ASAP makes sense
IMHO.
IMHO, the timer informs the hardware that the system is still alive
in the middle of panic(). If the timer is not working then the
hardware (chip) will think that the system frozen in panic()
and will power off the system. See the comments in
drivers/power/reset/ltc2952-poweroff.c:
[.... snip ...]
IMHO, we really have to keep it alive until we reach the reboot stage.
Another question is how it actually works when the interrupts are
disabled during panic() and the timer callbacks are not handled.
Agreed here! Guess I can move this one the reboot list, fine by me.
Unless PM folks think otherwise.
quoted
[...]
quoted
Disagree here, I'm CCing Florian for information.
This notifier preserves RAM so it's *very interesting* if we have
kmsg_dump() for example, but maybe might be also relevant in case kdump
kernel is configured to store something in a persistent RAM (then,
without this notifier, after kdump reboots the system data would be lost).
I see. It is actually similar problem as with
drivers/firmware/google/gsmi.c.
I does similar things like kmsg_dump() so it should be called in
the same location (after info notifier list and before kdump).
A solution might be to put it at these notifiers at the very
end of the "info" list or make extra "dump" notifier list.
Here I still disagree. I've commented in the other response thread
(about Google gsmi) about the semantics of the hypervisor list, but
again: this list should contain callbacks that
(a) Should run early, _by default_ before a kdump;
(b) Communicate with the firmware/hypervisor in a "low-risk" way;
Imagine a scenario where users configure kdump kernel to save something
in a persistent form in DRAM - it'd be like a late pstore, in the next
kernel. This callback enables that, it's meant to inform FW "hey, panic
happened, please from now on don't clear the RAM in the next FW-reboot".
I don't see a reason to postpone that - let's see if the maintainers
have an opinion.
Cheers,
Guilherme
From: Petr Mladek <pmladek@suse.com> Date: 2022-05-19 07:04:08
On Wed 2022-05-18 10:16:20, Guilherme G. Piccoli wrote:
On 18/05/2022 04:58, Petr Mladek wrote:
quoted
[...]
quoted
I does similar things like kmsg_dump() so it should be called in
the same location (after info notifier list and before kdump).
A solution might be to put it at these notifiers at the very
end of the "info" list or make extra "dump" notifier list.
I just want to point out that the above idea has problems.
Notifiers storing kernel log need to be treated as kmsg_dump().
In particular, we would need to know if there are any.
We do not need to call "info" notifier list before kdump
when there is no kernel log dumper registered.
Notifiers respect the priority concept, which is just a number that
orders the list addition (and the list is called in order).
I've used the last position to panic_print() [in patch 25] - one idea
here is to "reserve" the last position (represented by INT_MIN) for
notifiers that act like kmsg_dump(). I couldn't find any IIRC, but that
doesn't prevent us to save this position and comment about that.
I would ignore it for now. If anyone would want to safe the log
then they would need to read it. They will most likely use
the existing kmsg_dump() infastructure. In fact, they should
use it to avoid a code duplication.
Best Regards,
Petr
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-19 12:08:48
On 19/05/2022 04:03, Petr Mladek wrote:
[...]
I would ignore it for now. If anyone would want to safe the log
then they would need to read it. They will most likely use
the existing kmsg_dump() infastructure. In fact, they should
use it to avoid a code duplication.
Best Regards,
Petr
Cool, thanks! I agree, let's expect people use kmsg_dump() as they should =)
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-19 12:20:46
On 18/05/2022 19:17, Scott Branden wrote:
Hi Guilherme,
+Desmond
[...]
quoted
quoted
quoted
I'm afraid it breaks kdump if this device is not reset beforehand - it's
a doorbell write, so not high risk I think...
But in case the not-reset device can be probed normally in kdump kernel,
then I'm fine in moving this to the reboot list! I don't have the HW to
test myself.
Good question. Well, it if has to be called before kdump then
even "hypervisor" list is a wrong place because is not always
called before kdump.
[...]
We register to the panic notifier so that we can kill the VK card ASAP
to stop DMAing things over to the host side. If it is not notified then
memory may not be frozen when kdump is occurring.
Notifying the card on panic is also needed to allow for any type of
reset to occur.
So, the only thing preventing moving the notifier later is the chance
that memory is modified while kdump is occurring. Or, if DMA is
disabled before kdump already then this wouldn't be an issue and the
notification to the card (to allow for clean resets) can be done later.
Hi Scott / Desmond, thanks for the detailed answer! Is this adapter
designed to run in x86 only or you have other architectures' use cases?
I'm not expert on that, but I guess whether DMA is "kept" or not depends
a bit if IOMMU is used. IIRC, there was a copy of the DMAR table in
kdump (at least for Intel IOMMU). Also, devices are not properly
quiesced on kdump IIUC, we don't call shutdown/reset handlers, they're
skip due to the crash nature - so there is a risk of devices doing bad
things in the new kernel.
With that said, and given this is a lightweight notifier that ideally
should run ASAP, I'd keep this one in the hypervisor list. We can
"adjust" the semantic of this list to include lightweight notifiers that
reset adapters.
With that said, Petr has a point - not always such list is going to be
called before kdump. So, that makes me think in another idea: what if we
have another list, but not on panic path, but instead in the custom
crash_shutdown()? Drivers could add callbacks there that must execute
before kexec/kdump, no matter what.
Let me know your thoughts Scott / Desmond / Petr and all interested parties.
Cheers,
Guilherme
From: Scott Branden <scott.branden@broadcom.com> Date: 2022-05-19 19:21:56
On 2022-05-19 05:19, Guilherme G. Piccoli wrote:
On 18/05/2022 19:17, Scott Branden wrote:
quoted
Hi Guilherme,
+Desmond
[...]
quoted
quoted
quoted
I'm afraid it breaks kdump if this device is not reset beforehand - it's
a doorbell write, so not high risk I think...
But in case the not-reset device can be probed normally in kdump kernel,
then I'm fine in moving this to the reboot list! I don't have the HW to
test myself.
Good question. Well, it if has to be called before kdump then
even "hypervisor" list is a wrong place because is not always
called before kdump.
[...]
We register to the panic notifier so that we can kill the VK card ASAP
to stop DMAing things over to the host side. If it is not notified then
memory may not be frozen when kdump is occurring.
Notifying the card on panic is also needed to allow for any type of
reset to occur.
So, the only thing preventing moving the notifier later is the chance
that memory is modified while kdump is occurring. Or, if DMA is
disabled before kdump already then this wouldn't be an issue and the
notification to the card (to allow for clean resets) can be done later.
Hi Scott / Desmond, thanks for the detailed answer! Is this adapter
designed to run in x86 only or you have other architectures' use cases?
The adapter may be used in any PCIe design that supports DMA.
So it may be possible to run in arm64 servers.
I'm not expert on that, but I guess whether DMA is "kept" or not depends
a bit if IOMMU is used. IIRC, there was a copy of the DMAR table in
kdump (at least for Intel IOMMU). Also, devices are not properly
quiesced on kdump IIUC, we don't call shutdown/reset handlers, they're
skip due to the crash nature - so there is a risk of devices doing bad
things in the new kernel.
With that said, and given this is a lightweight notifier that ideally
should run ASAP, I'd keep this one in the hypervisor list. We can
"adjust" the semantic of this list to include lightweight notifiers that
reset adapters.
Sounds the best to keep system operating as tested today.
With that said, Petr has a point - not always such list is going to be
called before kdump. So, that makes me think in another idea: what if we
have another list, but not on panic path, but instead in the custom
crash_shutdown()? Drivers could add callbacks there that must execute
before kexec/kdump, no matter what.
It may be beneficial for some other drivers but for our use we would
then need to register for the panic path and the crash_shutdown path.
We notify the VK card for 2 purposes: one to stop DMA so memory stop
changing during a kdump. And also to get the card into a good state so
resets happen cleanly.
Let me know your thoughts Scott / Desmond / Petr and all interested parties.
Cheers,
Guilherme
From: Baoquan He <hidden> Date: 2022-05-19 23:45:21
On 05/15/22 at 07:47pm, Guilherme G. Piccoli wrote:
On 12/05/2022 11:03, Petr Mladek wrote:
......
quoted
OK, the question is how to make it better. Let's start with
a clear picture of the problem:
1. panic() has basically two funtions:
+ show/store debug information (optional ways and amount)
+ do something with the system (reboot, stay hanged)
2. There are 4 ways how to show/store the information:
+ tell hypervisor to store what it is interested about
+ crash_dump
+ kmsg_dump()
+ consoles
, where crash_dump and consoles are special:
+ crash_dump does not return. Instead it ends up with reboot.
+ Consoles work transparently. They just need an extra flush
before reboot or staying hanged.
3. The various notifiers do things like:
+ tell hypervisor about the crash
+ print more information (also stop watchdogs)
+ prepare system for reboot (touch some interfaces)
+ prepare system for staying hanged (blinking)
Note that it pretty nicely matches the 4 notifier lists.
I really appreciate the summary skill you have, to convert complex
problems in very clear and concise ideas. Thanks for that, very useful!
I agree with what was summarized above.
I want to say the similar words to Petr's reviewing comment when I went
through the patches and traced each reviewing sub-thread to try to
catch up. Petr has reivewed this series so carefully and given many
comments I want to ack immediately.
I agree with most of the suggestions from Petr to this patch, except of
one tiny concern, please see below inline comment.
quoted
Now, we need to decide about the ordering. The main area is how
to store the debug information. Consoles are transparent so
the quesition is about:
+ hypervisor
+ crash_dump
+ kmsg_dump
Some people need none and some people want all. There is a
risk that system might hung at any stage. This why people want to
make the order configurable.
But crash_dump() does not return when it succeeds. And kmsg_dump()
users havn't complained about hypervisor problems yet. So, that
two variants might be enough:
+ crash_dump (hypervisor, kmsg_dump as fallback)
+ hypervisor, kmsg_dump, crash_dump
One option "panic_prefer_crash_dump" should be enough.
And the code might look like:
void panic()
{
[...]
dump_stack();
kgdb_panic(buf);
< --- here starts the reworked code --- >
/* crash dump is enough when enabled and preferred. */
if (panic_prefer_crash_dump)
__crash_kexec(NULL);
I like the proposed skeleton of panic() and code style suggested by
Petr very much. About panic_prefer_crash_dump which might need be added,
I hope it has a default value true. This makes crash_dump execute at
first by default just as before, unless people specify
panic_prefer_crash_dump=0|n|off to disable it. Otherwise we need add
panic_prefer_crash_dump=1 in kernel and in our distros to enable kdump,
this is inconsistent with the old behaviour.
quoted
/* Stop other CPUs and focus on handling the panic state. */
if (has_kexec_crash_image)
crash_smp_send_stop();
else
smp_send_stop()
Here we have a very important point. Why do we need 2 variants of SMP
CPU stopping functions? I disagree with that - my understanding of this
after some study in architectures is that the crash_() variant is
"stronger", should work in all cases and if not, we should fix that -
that'd be a bug.
Such variant either maps to smp_send_stop() (in various architectures,
including XEN/x86) or overrides the basic function with more proper
handling for panic() case...I don't see why we still need such
distinction, if you / others have some insight about that, I'd like to
hear =)
quoted
/* Notify hypervisor about the system panic. */
atomic_notifier_call_chain(&panic_hypervisor_list, 0, NULL);
/*
* No need to risk extra info when there is no kmsg dumper
* registered.
*/
if (!has_kmsg_dumper())
__crash_kexec(NULL);
/* Add extra info from different subsystems. */
atomic_notifier_call_chain(&panic_info_list, 0, NULL);
kmsg_dump(KMSG_DUMP_PANIC);
__crash_kexec(NULL);
/* Flush console */
unblank_screen();
console_unblank();
debug_locks_off();
console_flush_on_panic(CONSOLE_FLUSH_PENDING);
if (panic_timeout > 0) {
delay()
}
/*
* Prepare system for eventual reboot and allow custom
* reboot handling.
*/
atomic_notifier_call_chain(&panic_reboot_list, 0, NULL);
You had the order of panic_reboot_list VS. consoles flushing inverted.
It might make sense, although I didn't do that in V1...
Are you OK in having a helper for console flushing, as I did in V1? It
makes code of panic() a bit less polluted / more focused I feel.
quoted
if (panic_timeout != 0) {
reboot();
}
/*
* Prepare system for the infinite waiting, for example,
* setup blinking.
*/
atomic_notifier_call_chain(&panic_loop_list, 0, NULL);
infinite_loop();
}
__crash_kexec() is there 3 times but otherwise the code looks
quite straight forward.
Note 1: I renamed the two last notifier list. The name 'post-reboot'
did sound strange from the logical POV ;-)
Note 2: We have to avoid the possibility to call "reboot" list
before kmsg_dump(). All callbacks providing info
have to be in the info list. It a callback combines
info and reboot functionality then it should be split.
There must be another way to calm down problematic
info callbacks. And it has to be solved when such
a problem is reported. Is there any known issue, please?
It is possible that I have missed something important.
But I would really like to make the logic as simple as possible.
OK, I agree with you! It's indeed simpler and if others agree, I can
happily change the logic to what you proposed. Although...currently the
"crash_kexec_post_notifiers" allows to call _all_ panic_reboot_list
callbacks _before kdump_.
We need to mention this change in the commit messages, but I really
would like to hear the opinions of heavy users of notifiers (as
Michael/Hyper-V) and the kdump interested parties (like Baoquan / Dave
Young / Hayatama). If we all agree on such approach, will change that
for V2 =)
Thanks again Petr, for the time spent in such detailed review!
Cheers,
Guilherme
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-20 11:24:43
On 19/05/2022 20:45, Baoquan He wrote:
[...]
quoted
I really appreciate the summary skill you have, to convert complex
problems in very clear and concise ideas. Thanks for that, very useful!
I agree with what was summarized above.
I want to say the similar words to Petr's reviewing comment when I went
through the patches and traced each reviewing sub-thread to try to
catch up. Petr has reivewed this series so carefully and given many
comments I want to ack immediately.
I agree with most of the suggestions from Petr to this patch, except of
one tiny concern, please see below inline comment.
Hi Baoquan, thanks! I'm glad you're also reviewing that =)
[...]
I like the proposed skeleton of panic() and code style suggested by
Petr very much. About panic_prefer_crash_dump which might need be added,
I hope it has a default value true. This makes crash_dump execute at
first by default just as before, unless people specify
panic_prefer_crash_dump=0|n|off to disable it. Otherwise we need add
panic_prefer_crash_dump=1 in kernel and in our distros to enable kdump,
this is inconsistent with the old behaviour.
I'd like to understand better why the crash_kexec() must always be the
first thing in your use case. If we keep that behavior, we'll see all
sorts of workarounds - see the last patches of this series, Hyper-V and
PowerPC folks hardcoded "crash_kexec_post_notifiers" in order to force
execution of their relevant notifiers (like the vmbus disconnect,
specially in arm64 that has no custom machine_crash_shutdown, or the
fadump case in ppc). This led to more risk in kdump.
The thing is: with the notifiers' split, we tried to keep only the most
relevant/necessary stuff in this first list, things that ultimately
should improve kdump reliability or if not, at least not break it. My
feeling is that, with this series, we should change the idea/concept
that kdump must run first nevertheless, not matter what. We're here
trying to accommodate the antagonistic goals of hypervisors that need
some clean-up (even for kdump to work) VS. kdump users, that wish a
"pristine" system reboot ASAP after the crash.
Cheers,
Guilherme
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-23 15:00:46
On 19/05/2022 16:20, Scott Branden wrote:
[...]
quoted
Hi Scott / Desmond, thanks for the detailed answer! Is this adapter
designed to run in x86 only or you have other architectures' use cases?
The adapter may be used in any PCIe design that supports DMA.
So it may be possible to run in arm64 servers.
quoted
[...]
With that said, and given this is a lightweight notifier that ideally
should run ASAP, I'd keep this one in the hypervisor list. We can
"adjust" the semantic of this list to include lightweight notifiers that
reset adapters.
Sounds the best to keep system operating as tested today.
quoted
With that said, Petr has a point - not always such list is going to be
called before kdump. So, that makes me think in another idea: what if we
have another list, but not on panic path, but instead in the custom
crash_shutdown()? Drivers could add callbacks there that must execute
before kexec/kdump, no matter what.
It may be beneficial for some other drivers but for our use we would
then need to register for the panic path and the crash_shutdown path.
We notify the VK card for 2 purposes: one to stop DMA so memory stop
changing during a kdump. And also to get the card into a good state so
resets happen cleanly.
Thanks Scott! With that, I guess it's really better to keep this
notifier in this hypervisor/early list - I'm planning to do that for V2.
Unless Petr or somebody has strong feelings against that, of course.
Cheers,
Guilherme
From: "Guilherme G. Piccoli" <gpiccoli@igalia.com> Date: 2022-05-23 20:41:17
On 28/04/2022 13:55, Helge Deller wrote:
[...]
You may add:
Acked-by: Helge Deller <deller@gmx.de> # parisc
Helge
Hi Helge, do you think would be possible to still pick this one for
v5.19 or do you prefer to hold for the next release?
I'm working on V2, so if it's merged for 5.19 I won't send it again.
Thanks,
Guilherme
From: Petr Mladek <pmladek@suse.com> Date: 2022-05-24 08:01:57
On Fri 2022-05-20 08:23:33, Guilherme G. Piccoli wrote:
On 19/05/2022 20:45, Baoquan He wrote:
quoted
[...]
quoted
I really appreciate the summary skill you have, to convert complex
problems in very clear and concise ideas. Thanks for that, very useful!
I agree with what was summarized above.
I want to say the similar words to Petr's reviewing comment when I went
through the patches and traced each reviewing sub-thread to try to
catch up. Petr has reivewed this series so carefully and given many
comments I want to ack immediately.
I agree with most of the suggestions from Petr to this patch, except of
one tiny concern, please see below inline comment.
Hi Baoquan, thanks! I'm glad you're also reviewing that =)
quoted
[...]
I like the proposed skeleton of panic() and code style suggested by
Petr very much. About panic_prefer_crash_dump which might need be added,
I hope it has a default value true. This makes crash_dump execute at
first by default just as before, unless people specify
panic_prefer_crash_dump=0|n|off to disable it. Otherwise we need add
panic_prefer_crash_dump=1 in kernel and in our distros to enable kdump,
this is inconsistent with the old behaviour.
I'd like to understand better why the crash_kexec() must always be the
first thing in your use case. If we keep that behavior, we'll see all
sorts of workarounds - see the last patches of this series, Hyper-V and
PowerPC folks hardcoded "crash_kexec_post_notifiers" in order to force
execution of their relevant notifiers (like the vmbus disconnect,
specially in arm64 that has no custom machine_crash_shutdown, or the
fadump case in ppc). This led to more risk in kdump.
The thing is: with the notifiers' split, we tried to keep only the most
relevant/necessary stuff in this first list, things that ultimately
should improve kdump reliability or if not, at least not break it. My
feeling is that, with this series, we should change the idea/concept
that kdump must run first nevertheless, not matter what. We're here
trying to accommodate the antagonistic goals of hypervisors that need
some clean-up (even for kdump to work) VS. kdump users, that wish a
"pristine" system reboot ASAP after the crash.
Good question. I wonder if Baoquan knows about problems caused by the
particular notifiers that will end up in the hypervisor list. Note
that there will be some shuffles and the list will be slightly
different in V2.
Anyway, I see four possible solutions:
1. The most conservative approach is to keep the current behavior
and call kdump first by default.
2. A medium conservative approach to change the default default
behavior and call hypervisor and eventually the info notifiers
before kdump. There still would be the possibility to call kdump
first by the command line parameter.
3. Remove the possibility to call kdump first completely. It would
assume that all the notifiers in the info list are super safe
or that they make kdump actually more safe.
4. Create one more notifier list for operations that always should
be called before crash_dump.
Regarding the extra notifier list (4th solution). It is not clear to
me whether it would be always called even before hypervisor list or
when kdump is not enabled. We must not over-engineer it.
2nd proposal looks like a good compromise. But maybe we could do
this change few releases later. The notifiers split is a big
change on its own.
Best Regards,
Petr
From: Petr Mladek <pmladek@suse.com> Date: 2022-05-24 08:05:07
On Mon 2022-05-23 11:56:12, Guilherme G. Piccoli wrote:
On 19/05/2022 16:20, Scott Branden wrote:
quoted
[...]
quoted
Hi Scott / Desmond, thanks for the detailed answer! Is this adapter
designed to run in x86 only or you have other architectures' use cases?
The adapter may be used in any PCIe design that supports DMA.
So it may be possible to run in arm64 servers.
quoted
[...]
With that said, and given this is a lightweight notifier that ideally
should run ASAP, I'd keep this one in the hypervisor list. We can
"adjust" the semantic of this list to include lightweight notifiers that
reset adapters.
Sounds the best to keep system operating as tested today.
quoted
With that said, Petr has a point - not always such list is going to be
called before kdump. So, that makes me think in another idea: what if we
have another list, but not on panic path, but instead in the custom
crash_shutdown()? Drivers could add callbacks there that must execute
before kexec/kdump, no matter what.
It may be beneficial for some other drivers but for our use we would
then need to register for the panic path and the crash_shutdown path.
We notify the VK card for 2 purposes: one to stop DMA so memory stop
changing during a kdump. And also to get the card into a good state so
resets happen cleanly.
Thanks Scott! With that, I guess it's really better to keep this
notifier in this hypervisor/early list - I'm planning to do that for V2.
Unless Petr or somebody has strong feelings against that, of course.
I am fine with it because we do not have a better solution at the
moment.
It might be a good candidate for the 5th notifier list mentioned
in the thread https://lore.kernel.org/r/YoyQyHHfhIIXSX0U@alley .
But I am not sure if the 5th list is worth the complexity.
Best Regards,
Petr
From: Baoquan He <hidden> Date: 2022-05-24 08:32:28
On 05/20/22 at 08:23am, Guilherme G. Piccoli wrote:
On 19/05/2022 20:45, Baoquan He wrote:
quoted
[...]
quoted
I really appreciate the summary skill you have, to convert complex
problems in very clear and concise ideas. Thanks for that, very useful!
I agree with what was summarized above.
I want to say the similar words to Petr's reviewing comment when I went
through the patches and traced each reviewing sub-thread to try to
catch up. Petr has reivewed this series so carefully and given many
comments I want to ack immediately.
I agree with most of the suggestions from Petr to this patch, except of
one tiny concern, please see below inline comment.
Hi Baoquan, thanks! I'm glad you're also reviewing that =)
quoted
[...]
I like the proposed skeleton of panic() and code style suggested by
Petr very much. About panic_prefer_crash_dump which might need be added,
I hope it has a default value true. This makes crash_dump execute at
first by default just as before, unless people specify
panic_prefer_crash_dump=0|n|off to disable it. Otherwise we need add
panic_prefer_crash_dump=1 in kernel and in our distros to enable kdump,
this is inconsistent with the old behaviour.
I'd like to understand better why the crash_kexec() must always be the
first thing in your use case. If we keep that behavior, we'll see all
sorts of workarounds - see the last patches of this series, Hyper-V and
PowerPC folks hardcoded "crash_kexec_post_notifiers" in order to force
execution of their relevant notifiers (like the vmbus disconnect,
specially in arm64 that has no custom machine_crash_shutdown, or the
fadump case in ppc). This led to more risk in kdump.
Firstly, kdump is not always the first thing. In any use case, if kdump
kernel is not loaded, it's not the first thing at all. Not to mention
if crash_kexec_post_notifiers is specified.
if kdump kernel is loaded, kdump has been executing firslty, since it
was added into kenrel/panic(); Until 2014, Masa added crash_kexec_post_notifiers
kernel parameter to make panic notifiers be able to execute before kdump
if specified.
commit dc009d92435f99498cbc579ce76bf28e837e2c14
Author: Eric W. Biederman [off-list ref]
Date: Sat Jun 25 14:57:52 2005 -0700
[PATCH] kexec: add kexec syscalls
commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45
Author: Masami Hiramatsu [off-list ref]
Date: Fri Jun 6 14:37:07 2014 -0700
kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers
Changing this will cause regression. During these years, nobody ever doubt
kdump should execute firstly if crashkernel is reserved and kdump kernel is
loaded. That's not saying we can't change
this, but need a convincing justification.
Secondly, even with the notifiers' split, we can't guarantee people will
absolutely add notifiers into right list in the future. Letting kdump
execute behind lists by default will put kdump into risk.
For example, you replied to Hatamata saying you have been working with
kdump in the last 3, 4 years, and you have have been working on these
panic notifiers refactoring issue in the recent months. However, in your
refactoring patches of introducing hypervisor/info/pre-reboot, I noticed
you acked the suggestion from Petr that several notifiers need be moved to
correct position. So even you can't make sure these, how can other people
be able to recognize which list should be 100% appropriate when they try
to register one notifier for their sub-component?
At last, I am wondering why fadump matters. I don't know in which case
people wants to load kdump kernel, but expect to trigger crash fadump.
Power people need consider this carefully and makes some change. Fadump
just borrows the crashkernel reservation mechanism. If fadump would rather
take risk to run all panic notifiers, whether fadump really needs them
or not, then execute crash_fadump(), that's powerpc's business.
As for Hyper-V, if it enforces to terminate VMbus connection, no matter
it's kdump or not, why not taking it out of panic notifiers list and
execute it before kdump unconditionally. Below is abstracted from
Michael's words.
https://lore.kernel.org/all/MWHPR21MB15933573F5C81C5250BF6A1CD75E9@MWHPR21MB1593.namprd21.prod.outlook.com/T/#u
=======
I looked at the code again, and should revise my previous comments
somewhat. The Hyper-V resets that I described indeed must be done
prior to kexec'ing the kdump kernel. Most such resets are actually
done via __crash_kexec() -> machine_crash_shutdown(), not via the
panic notifier. However, the Hyper-V panic notifier must terminate the
VMbus connection, because that must be done even if kdump is not
being invoked. See commit 74347a99e73.
=======
The thing is: with the notifiers' split, we tried to keep only the most
relevant/necessary stuff in this first list, things that ultimately
should improve kdump reliability or if not, at least not break it. My
feeling is that, with this series, we should change the idea/concept
that kdump must run first nevertheless, not matter what. We're here
trying to accommodate the antagonistic goals of hypervisors that need
some clean-up (even for kdump to work) VS. kdump users, that wish a
"pristine" system reboot ASAP after the crash.
Cheers,
Guilherme
From: Baoquan He <hidden> Date: 2022-05-24 10:19:21
On 05/24/22 at 10:01am, Petr Mladek wrote:
On Fri 2022-05-20 08:23:33, Guilherme G. Piccoli wrote:
quoted
On 19/05/2022 20:45, Baoquan He wrote:
quoted
[...]
quoted
I really appreciate the summary skill you have, to convert complex
problems in very clear and concise ideas. Thanks for that, very useful!
I agree with what was summarized above.
I want to say the similar words to Petr's reviewing comment when I went
through the patches and traced each reviewing sub-thread to try to
catch up. Petr has reivewed this series so carefully and given many
comments I want to ack immediately.
I agree with most of the suggestions from Petr to this patch, except of
one tiny concern, please see below inline comment.
Hi Baoquan, thanks! I'm glad you're also reviewing that =)
quoted
[...]
I like the proposed skeleton of panic() and code style suggested by
Petr very much. About panic_prefer_crash_dump which might need be added,
I hope it has a default value true. This makes crash_dump execute at
first by default just as before, unless people specify
panic_prefer_crash_dump=0|n|off to disable it. Otherwise we need add
panic_prefer_crash_dump=1 in kernel and in our distros to enable kdump,
this is inconsistent with the old behaviour.
I'd like to understand better why the crash_kexec() must always be the
first thing in your use case. If we keep that behavior, we'll see all
sorts of workarounds - see the last patches of this series, Hyper-V and
PowerPC folks hardcoded "crash_kexec_post_notifiers" in order to force
execution of their relevant notifiers (like the vmbus disconnect,
specially in arm64 that has no custom machine_crash_shutdown, or the
fadump case in ppc). This led to more risk in kdump.
The thing is: with the notifiers' split, we tried to keep only the most
relevant/necessary stuff in this first list, things that ultimately
should improve kdump reliability or if not, at least not break it. My
feeling is that, with this series, we should change the idea/concept
that kdump must run first nevertheless, not matter what. We're here
trying to accommodate the antagonistic goals of hypervisors that need
some clean-up (even for kdump to work) VS. kdump users, that wish a
"pristine" system reboot ASAP after the crash.
Good question. I wonder if Baoquan knows about problems caused by the
particular notifiers that will end up in the hypervisor list. Note
that there will be some shuffles and the list will be slightly
different in V2.
Yes, I knew some of them. Please check my response to Guilherme.
We have bug to track the issue on Hyper-V in which failure happened
during panic notifiers running, haven't come to kdump. Seems both of
us sent mail replying to Guilherme at the same time.
Anyway, I see four possible solutions:
1. The most conservative approach is to keep the current behavior
and call kdump first by default.
2. A medium conservative approach to change the default default
behavior and call hypervisor and eventually the info notifiers
before kdump. There still would be the possibility to call kdump
first by the command line parameter.
3. Remove the possibility to call kdump first completely. It would
assume that all the notifiers in the info list are super safe
or that they make kdump actually more safe.
4. Create one more notifier list for operations that always should
be called before crash_dump.
I would vote for 1 or 4 without any hesitation, and prefer 4. I ever
suggest the variant of solution 4 in v1 reviewing. That's taking those
notifiers out of list and enforcing to execute them before kdump. E.g
the one on HyperV to terminate VMbus connection. Maybe solution 4 is
better to provide a determinate way for people to add necessary code
at the earliest part.
Regarding the extra notifier list (4th solution). It is not clear to
me whether it would be always called even before hypervisor list or
when kdump is not enabled. We must not over-engineer it.
One thing I would like to notice is, no matter how perfect we split the
lists this time, we can't gurantee people will add notifiers reasonablly
in the future. And people from different sub-component may not do
sufficient investigation and add them to fulfil their local purpose.
The current panic notifers list is the best example. Hyper-V actually
wants to run some necessary code before kdump, but not all of them, they
just add it, ignoring the original purpose of
crash_kexec_post_notifiers. I guess they do like this just because it's
easy to do, no need to bother changing code in generic place.
Solution 4 can make this no doubt, that's why I like it better.
2nd proposal looks like a good compromise. But maybe we could do
this change few releases later. The notifiers split is a big
change on its own.
As I replied to Guilherme, solution 2 will cause regression if not
calling kdump firstly. Solution 3 leaves people space to make mistake,
they could add nontifier into wrong list.
I would like to note again that the panic notifiers are optional to run,
while kdump is expectd once loaded, from the original purpose. I guess
people I know will still have this thought, e.g Hatayama, Masa, they are
truly often use panic notifiers like this on their company's system.
From: Michael Ellerman <hidden> Date: 2022-05-24 11:19:37
On Wed, 27 Apr 2022 19:48:54 -0300, Guilherme G. Piccoli wrote:
Hey folks, this is an attempt to improve/refactor the dated panic notifiers
infrastructure. This is strongly based in a suggestion made by Pter Mladek [0]
some time ago, and it's finally ready. Below I'll detail the patch ordering,
testing made, etc.
First, a bit about the reason behind this.
The panic notifiers list is an infrastructure that allows callbacks to execute
during panic time. Happens that anybody can add functions there, no ordering
is enforced (by default) and the decision to execute or not such notifiers
before kdump may lead to high risk of failure in crash scenarios - default is
not to execute any of them. There is a parameter acting as a switch for that.
But some architectures require some notifiers, so..it's messy.
[...]