Re: [PATCH 3.4 098/107] kernel/watchdog.c: touch_nmi_watchdog should only touch local cpu not every one
From: Zefan Li
Date: Wed Mar 16 2016 - 21:21:07 EST
>> diff --git a/kernel/watchdog.c b/kernel/watchdog.c
>> index 991aa93..7527c8c 100644
>> --- a/kernel/watchdog.c
>> +++ b/kernel/watchdog.c
>> @@ -162,6 +162,14 @@ void touch_nmi_watchdog(void)
>> per_cpu(watchdog_nmi_touch, cpu) = true;
> The above for-loop was to be replaced by the non-for-loop below.
> The above for-loop is the problem this patch was solving, so keeping it
> around does not solve anything. :-)
OOps, my fault. I'll remove this for-loop. Thanks for your review!
>> + /*
>> + * 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;