Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_watchdog and touch_softlockup_watchdog

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Wednesday, August 18, 2010 - 1:01 pm

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.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
fix BUG: using smp_processor_id() in touch_nmi_watchdog an ..., Sergey Senozhatsky, (Fri Aug 13, 3:21 am)
[PATCH] fix BUG using smp_processor_id() in touch_nmi_watc ..., Sergey Senozhatsky, (Mon Aug 16, 7:08 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Frederic Weisbecker, (Mon Aug 16, 7:59 pm)
[PATCH] fix BUG using smp_processor_id() in touch_nmi_watc ..., Sergey Senozhatsky, (Tue Aug 17, 12:56 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 1:39 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 2:24 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 3:28 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Sergey Senozhatsky, (Tue Aug 17, 3:39 am)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Frederic Weisbecker, (Tue Aug 17, 7:48 pm)
Re: [PATCH] fix BUG using smp_processor_id() in touch_nmi_ ..., Andrew Morton, (Wed Aug 18, 1:01 pm)
[PATCH] avoid second smp_processor_id() call in __touch_wa ..., Sergey Senozhatsky, (Wed Sep 22, 2:00 am)
Re: [PATCH] avoid second smp_processor_id() call in __touc ..., Frederic Weisbecker, (Wed Sep 22, 9:27 am)
Re: [PATCH] avoid second smp_processor_id() call in __touc ..., Frederic Weisbecker, (Wed Sep 22, 9:47 am)
Re: [PATCH] avoid second smp_processor_id() call in __touc ..., Sergey Senozhatsky, (Sat Sep 25, 10:43 am)