Skip to contentSkip to conversation

Getting rid of the NMI latency watchdog

RFC Philippe Gerum 3 participants 6 messages May 19, 2011 – Jun 22, 2011

lore
Share & tools
lore
#0 lore raw

The NMI latency watchdog is a feature Xenomai supports when proper hardware is available, which triggers a stack backtrace dump, then panics when a real-time timer tick is late by a given amount of time. We used it in the early times to chase pathological latencies, particularly when debugging the original SMP port.

We currently have two architectures supporting that watchdog, namely x86 and blackfin. x86-wise, the rebasing of the NMI support in mainline over the perf sub-system just obsoleted our NMI hijacking badly, making it unusable since 2.6.38.

As I was diving in our NMI support code to adapt it once again for 2.6.38 - with a vague feeling of seasickness coming - I felt maybe time has come to question the very presence of that feature in our code base:

- NMI watchdog predated the latency tracer. AFAIC, I stopped using the former long ago, preferring the latter for debugging latency issues.

- the non-maskable nature of the interrupt trigger does not help us nowadays compared to using the I-pipe tracer: the mainline NMI support would catch hard lockups with irqs off and panic the same way, and the tracer would help spotting the issue with a much finer level of detail in case the latency spot leaves the machine in a sane state, Ie. when the board remains usable and allows for inspection of /proc/ipipe/trace files.

- hijacking the mainline NMI code the way we do has always been a massive pain on x86, prone to trigger conflicts with later kernel releases.

For this reason, I'm considering issuing a patch for a complete removal of the NMI latency watchdog code in Xenomai 2.6.x, disabling the feature for 2.6.38 kernels and above in 2.5.x.

Comments welcome.

Signature · 1 line
Philippe.
#1 lore raw
Quoted 5 lines · Philippe Gerum

For this reason, I'm considering issuing a patch for a complete removal of the NMI latency watchdog code in Xenomai 2.6.x, disabling the feature for 2.6.38 kernels and above in 2.5.x.

Comments welcome.

I am in the same case as you: I no longer use Xeno's NMI watchdog, so I agree to get rid of it.

Signature · 1 line
                                                                Gilles.
#2 lore raw
Quoted 9 lines · Gilles Chanteperdrix
Quoted 5 lines · Philippe Gerum

For this reason, I'm considering issuing a patch for a complete removal of the NMI latency watchdog code in Xenomai 2.6.x, disabling the feature for 2.6.38 kernels and above in 2.5.x.

Comments welcome.

I am in the same case as you: I no longer use Xeno's NMI watchdog, so I agree to get rid of it.

Yeah. The last time we wanted to use it get more information about a hard hang, the CPU we used was not supported.

Philippe, did you test the Linux watchdog already, if it generate proper results on artificial Xenomai lockups on a single core?

Jan

#3 lore raw
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · Gilles Chanteperdrix
Quoted 5 lines · Philippe Gerum

For this reason, I'm considering issuing a patch for a complete removal of the NMI latency watchdog code in Xenomai 2.6.x, disabling the feature for 2.6.38 kernels and above in 2.5.x.

Comments welcome.

Quoted 8 lines
Quoted 2 lines

I am in the same case as you: I no longer use Xeno's NMI watchdog, so I agree to get rid of it.

Yeah. The last time we wanted to use it get more information about a hard hang, the CPU we used was not supported.

Philippe, did you test the Linux watchdog already, if it generate proper results on artificial Xenomai lockups on a single core?

This works provided we tell the pipeline to enter printk-sync mode when the watchdog kicks. So I'd say that we could probably do a better job in making the pipeline core smarter wrt NMI watchdog context handling than asking Xenomai to dup the mainline code for having its own NMI handling.

Quoted 3 lines

Jan

Signature · 1 line
Philippe.
#4 lore raw
Quoted 15 lines · Philippe Gerum
Quoted 14 lines · Jan Kiszka
Quoted 9 lines · Gilles Chanteperdrix
Quoted 5 lines · Philippe Gerum

For this reason, I'm considering issuing a patch for a complete removal of the NMI latency watchdog code in Xenomai 2.6.x, disabling the feature for 2.6.38 kernels and above in 2.5.x.

Comments welcome.

I am in the same case as you: I no longer use Xeno's NMI watchdog, so I agree to get rid of it.

Yeah. The last time we wanted to use it get more information about a hard hang, the CPU we used was not supported.

Quoted 7 lines
Quoted 2 lines

Philippe, did you test the Linux watchdog already, if it generate proper results on artificial Xenomai lockups on a single core?

This works provided we tell the pipeline to enter printk-sync mode when the watchdog kicks. So I'd say that we could probably do a better job in making the pipeline core smarter wrt NMI watchdog context handling than asking Xenomai to dup the mainline code for having its own NMI handling.

If nobody disagrees, I am removing this code from -head. Now.

Signature · 1 line
                                                                Gilles.
#5 lore raw
Quoted 19 lines · Gilles Chanteperdrix
Quoted 18 lines · Philippe Gerum
Quoted 16 lines · Jan Kiszka
Quoted 9 lines · Gilles Chanteperdrix
Quoted 5 lines · Philippe Gerum

For this reason, I'm considering issuing a patch for a complete removal of the NMI latency watchdog code in Xenomai 2.6.x, disabling the feature for 2.6.38 kernels and above in 2.5.x.

Comments welcome.

I am in the same case as you: I no longer use Xeno's NMI watchdog, so I agree to get rid of it.

Yeah. The last time we wanted to use it get more information about a hard hang, the CPU we used was not supported.

Philippe, did you test the Linux watchdog already, if it generate proper results on artificial Xenomai lockups on a single core?

Quoted 7 lines
Quoted 4 lines

This works provided we tell the pipeline to enter printk-sync mode when the watchdog kicks. So I'd say that we could probably do a better job in making the pipeline core smarter wrt NMI watchdog context handling than asking Xenomai to dup the mainline code for having its own NMI handling.

If nobody disagrees, I am removing this code from -head. Now.

Ack.

Signature · 1 line
Philippe.