Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753831AbdF0Ut0 convert rfc822-to-8bit (ORCPT ); Tue, 27 Jun 2017 16:49:26 -0400 Received: from mga14.intel.com ([192.55.52.115]:22086 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753805AbdF0UtX (ORCPT ); Tue, 27 Jun 2017 16:49:23 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,272,1496127600"; d="scan'208";a="1187654030" From: "Liang, Kan" To: Don Zickus , Thomas Gleixner CC: "linux-kernel@vger.kernel.org" , "mingo@kernel.org" , "akpm@linux-foundation.org" , "babu.moger@oracle.com" , "atomlin@redhat.com" , "prarit@redhat.com" , "torvalds@linux-foundation.org" , "peterz@infradead.org" , "eranian@google.com" , "acme@redhat.com" , "ak@linux.intel.com" , "stable@vger.kernel.org" Subject: RE: [PATCH V2] kernel/watchdog: fix spurious hard lockups Thread-Topic: [PATCH V2] kernel/watchdog: fix spurious hard lockups Thread-Index: AQHS6pyX93nZMscYGUu+rlSjZMkkxKIvVm6AgAErMwCAARD/gIAAjbWAgABZxoCABJ2VAIABkHmAgACKoRA= Date: Tue, 27 Jun 2017 20:49:19 +0000 Message-ID: <37D7C6CF3E00A74B8858931C1DB2F0775371357D@SHSMSX103.ccr.corp.intel.com> References: <20170621144118.5939-1-kan.liang@intel.com> <20170622154450.2lua7fdmigcixldw@redhat.com> <20170623162907.l6inpxgztwwkeaoi@redhat.com> <20170626201927.3ak7fk3yvdzbb4ay@redhat.com> <20170627201249.ll34ecwhpme3vh2u@redhat.com> In-Reply-To: <20170627201249.ll34ecwhpme3vh2u@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzc2ODc1NmEtOTkwNi00ODM5LWI3N2YtMzJjMzViNGU4ZTBkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjR3NVJQQnBwMmN6ZDdheWwzdkNGek9PcjRTQ0phYk5EanVMMnl0WnRScTg9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1524 Lines: 51 > On Mon, Jun 26, 2017 at 04:19:27PM -0400, Don Zickus wrote: > > On Fri, Jun 23, 2017 at 11:50:25PM +0200, Thomas Gleixner wrote: > > > On Fri, 23 Jun 2017, Don Zickus wrote: > > > > Hmm, all this work for a temp fix. Kan, how much longer until the > > > > real fix of having perf count the right cycles? > > > > > > Quite a while. The approach is wilfully breaking the user space ABI, > > > which is not going to happen. > > > > > > And there is a simpler solution as well, as I said here: > > > > > > > > > http://lkml.kernel.org/r/alpine.DEB.2.20.1706221730520.1885@nanos > > > > Hi Thomas, > > > > So, you are saying instead of slowing down the perf counter, speed up > > the hrtimer to sample more frequently like so: > > > > diff --git a/kernel/watchdog.c b/kernel/watchdog.c index > > 03e0b69..8ff49de 100644 > > --- a/kernel/watchdog.c > > +++ b/kernel/watchdog.c > > @@ -160,7 +160,7 @@ static void set_sample_period(void) > > * and hard thresholds) to increment before the > > * hardlockup detector generates a warning > > */ > > - sample_period = get_softlockup_thresh() * ((u64)NSEC_PER_SEC / 5); > > + sample_period = get_softlockup_thresh() * ((u64)NSEC_PER_SEC / > 10); > > } > > Hi Kan, > > Will the above patch work for you? > I haven't heard back any test result yet. The above patch looks good to me. But I'm not sure if /10 is enough. We may need /15. Anyway, I think we will test /10 first. Which workaround do you prefer, the above one or the one checking timestamp? Thanks, Kan