Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756222AbcCQBVC (ORCPT ); Wed, 16 Mar 2016 21:21:02 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:17744 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752656AbcCQBU7 (ORCPT ); Wed, 16 Mar 2016 21:20:59 -0400 Subject: Re: [PATCH 3.4 098/107] kernel/watchdog.c: touch_nmi_watchdog should only touch local cpu not every one To: Don Zickus , References: <1458115541-5712-1-git-send-email-lizf@kernel.org> <1458115601-5762-98-git-send-email-lizf@kernel.org> <20160316140946.GR194535@redhat.com> CC: , , Ben Zhang , Andrew Morton , "Linus Torvalds" From: Zefan Li Message-ID: <56EA0658.2080609@huawei.com> Date: Thu, 17 Mar 2016 09:20:24 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160316140946.GR194535@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020206.56EA066C.016F,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 302c252151aeb0f438409771874e7943 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 935 Lines: 34 >> 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; >> touch_softlockup_watchdog(); >> } >> EXPORT_SYMBOL(touch_nmi_watchdog); > > Cheers, > Don > . >