lkml.org 
[lkml]   [2010]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] watchdog: touch_nmi_watchdog should only touch local cpu not every one
On (11/04/10 21:18), Don Zickus wrote:
> void touch_nmi_watchdog(void)
> {
> + /*
> + * Using __raw here because some code paths have
> + * preemption enabled. If preemption is enabled
> + * then interrupts should be enabled too, in which
> + * case we shouldn't have to worry about the watchdog
> + * going off.
> + */
> + __raw_get_cpu_var(watchdog_nmi_touch) = true;
> +
> + touch_softlockup_watchdog();
> +}
> +EXPORT_SYMBOL(touch_nmi_watchdog);
> +
> +void touch_all_nmi_watchdogs(void)
> +{
> if (watchdog_enabled) {
> unsigned cpu;
>
> @@ -151,7 +166,7 @@ void touch_nmi_watchdog(void)
> }
> touch_softlockup_watchdog();
> }
> -EXPORT_SYMBOL(touch_nmi_watchdog);
> +EXPORT_SYMBOL(touch_all_nmi_watchdogs);
>

Hello,
Seems like no one is actually calling touch_all_nmi_watchdogs, as for now.
Right?


Minor nit

touch_all_nmi_watchdogs:
...
for_each_present_cpu(cpu) {
if (per_cpu(watchdog_nmi_touch, cpu) != true)
per_cpu(watchdog_nmi_touch, cpu) = true;
}


which is, I belive, could be simplified to
for_each_present_cpu(cpu) {
per_cpu(watchdog_nmi_touch, cpu) = true;
}



Sergey
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2010-11-05 14:55    [W:0.056 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site