On Wed, 18 Aug 2010 04:48:05 +0200
Frederic Weisbecker <fweisbec@gmail.com> wrote:
I'm not sure who looks after osl.c. I added linux-acpi to cc.
The touch_nmi_watchdog() was added to acpi_os_stall() by little old me
in 2003. It was committed by Andy with the patch title "ACPI:
Correctly handle NMI watchdog during long stalls (Andrew Morton)". My
title was "ACPI poweroff trigers the NMI watchdog". My changelog was
ACPI poweroff trigers the NMI watchdog. Fix.
(My spelling has improved with age).
So. If we remove that touch, will poweroff still trigger the NMI?
Dunno.
The surprise new requirement that touch_nmi_watchdog() be called from
non-preemptible code does seem to make sense IMO. It's hard to see why
anyone would be touching the watchdog unless he's spinning in irqs-off
code. Except, of course, when we have a utility function which can be
called from wither irqs-on or irqs-off: acpi_os_stall().
That being said, it's not good to introduce new API requirements by
accident! An audit of all callers should first be performed, at least.
The surprise new requirement that touch_softlockup_watchdog() be called
from non-preemptible code doesn't make sense IMO. If I have a piece of
code in the kernel which I expect to sit in TASK_UNINTERRUPTIBLE state
for three minutes waiting for my egg to boil, I should be able to do
that and I should be able to touch the softlockup detector without
needing to go non-preemptible.
--