Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp239413ybi; Fri, 7 Jun 2019 07:18:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbZs5HgKBtslBMgjscgTl7dGusMJYl1y0GNx9qt/9mnaUA+rO2uZlWcmzPJLvgsevE4Ont X-Received: by 2002:a17:90a:338e:: with SMTP id n14mr5453830pjb.35.1559917138473; Fri, 07 Jun 2019 07:18:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559917138; cv=none; d=google.com; s=arc-20160816; b=npSh3ImcQahf63usjrWOivIjFuNYEIFdukycUMgLSEtSj8FYDdNZGzr32vGspdx9jq poZuNxoPr17AobcB5RMejZBuYyo5segjWtF9RaWgaShVph7xhO5m9adtMqtbnbbCu7zR uH9f2r/r5woZjEeaCyySKGY0GxVJdjTJTtF5xn0H8xFBRShX7a2yMmawAIEAI95gl8un pyU61mka/JPTd3kSZLb4Bammgga7Aid7BUqyzFqTBys8/QVp3OTnC/xYTFsZW0KcreCv Bn4ODwFUalwJT4ulD85q34A8v9QcYKnZp3SvhegXsm2LCt15hEFc8gVbMQjlLNqwNxD4 ihMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=kTT3LeWI7gObXEqrEo7jgCtqsyDolQFek7ZgeGvp1Dg=; b=jk01kLPXaY6dry2wBGlQEHs2V2qT3zr+iUnXSHc7QIcvbEVFOAh0YiyxFRRoJFVgGn 0ENXZIjJINcdqwJawgs7VE7KmKpX4b/HzYt59EGKlo5B9Bmw1psHcmEBT2nKb8ePl12s I+pNRzBNAyZLcuyy4/np8dNmPY0mFcGYidwSd5zKSD/PisZotULOWeiORVqvFiPaWyd2 7NLyEKNPI/OH/cdNHGzncAh/xVdrM9y2LdKtKKa2tTDhsqOlGB1CueFXdGjmzzTDtxxb Lz46hSueZYlbP4gtIkzR67r65ei9bviBgW0I+254mqiltICEXclHxNpL+ENRGEcqSGJm kU+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g9si1796253plp.13.2019.06.07.07.18.41; Fri, 07 Jun 2019 07:18:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729005AbfFGOQS (ORCPT + 99 others); Fri, 7 Jun 2019 10:16:18 -0400 Received: from mga17.intel.com ([192.55.52.151]:47640 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728910AbfFGOQR (ORCPT ); Fri, 7 Jun 2019 10:16:17 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Jun 2019 07:16:14 -0700 X-ExtLoop1: 1 Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by orsmga002.jf.intel.com with ESMTP; 07 Jun 2019 07:16:14 -0700 Date: Fri, 7 Jun 2019 07:14:16 -0700 From: Ricardo Neri To: Stephane Eranian Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Ashok Raj , Joerg Roedel , Andi Kleen , Peter Zijlstra , Suravee Suthikulpanit , "Ravi V. Shankar" , Randy Dunlap , x86 , LKML , iommu@lists.linux-foundation.org, Ricardo Neri Subject: Re: [RFC PATCH v4 17/21] x86/tsc: Switch to perf-based hardlockup detector if TSC become unstable Message-ID: <20190607141416.GA30499@ranerica-svr.sc.intel.com> References: <1558660583-28561-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1558660583-28561-18-git-send-email-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 06, 2019 at 05:35:51PM -0700, Stephane Eranian wrote: > Hi Ricardo, Hi Stephane, > Thanks for your contribution here. It is very important to move the > watchdog out of the PMU wherever possible. Indeed, using the PMU for the hardlockup detector is still the default option. This patch series proposes a new kernel command line to switch to use the HPET. > > On Thu, May 23, 2019 at 6:17 PM Ricardo Neri > wrote: > > > > The HPET-based hardlockup detector relies on the TSC to determine if an > > observed NMI interrupt was originated by HPET timer. Hence, this detector > > can no longer be used with an unstable TSC. > > > > In such case, permanently stop the HPET-based hardlockup detector and > > start the perf-based detector. > > > > Signed-off-by: Ricardo Neri > > --- > > arch/x86/include/asm/hpet.h | 2 ++ > > arch/x86/kernel/tsc.c | 2 ++ > > arch/x86/kernel/watchdog_hld.c | 7 +++++++ > > 3 files changed, 11 insertions(+) > > > > diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h > > index fd99f2390714..a82cbe17479d 100644 > > --- a/arch/x86/include/asm/hpet.h > > +++ b/arch/x86/include/asm/hpet.h > > @@ -128,6 +128,7 @@ extern int hardlockup_detector_hpet_init(void); > > extern void hardlockup_detector_hpet_stop(void); > > extern void hardlockup_detector_hpet_enable(unsigned int cpu); > > extern void hardlockup_detector_hpet_disable(unsigned int cpu); > > +extern void hardlockup_detector_switch_to_perf(void); > > #else > > static inline struct hpet_hld_data *hpet_hardlockup_detector_assign_timer(void) > > { return NULL; } > > @@ -136,6 +137,7 @@ static inline int hardlockup_detector_hpet_init(void) > > static inline void hardlockup_detector_hpet_stop(void) {} > > static inline void hardlockup_detector_hpet_enable(unsigned int cpu) {} > > static inline void hardlockup_detector_hpet_disable(unsigned int cpu) {} > > +static void harrdlockup_detector_switch_to_perf(void) {} > > #endif /* CONFIG_X86_HARDLOCKUP_DETECTOR_HPET */ > > > This does not compile for me when CONFIG_X86_HARDLOCKUP_DETECTOR_HPET > is not enabled. > because: > 1- you have a typo on the function name > 2- you are missing the inline keyword I am sorry. This was an oversight on my side. I have corrected this in preparation for a v5. Thanks and BR, Ricardo