Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp120497imb; Thu, 28 Feb 2019 18:05:29 -0800 (PST) X-Google-Smtp-Source: APXvYqxZjsDQOevYNh1Qy5WJfI60bj5LKq4+VpNxN0YWMt1kuZW9CAv93z656VdX4nyt6jZKjh7n X-Received: by 2002:a17:902:e30e:: with SMTP id cg14mr2806170plb.132.1551405929185; Thu, 28 Feb 2019 18:05:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551405929; cv=none; d=google.com; s=arc-20160816; b=U4qkoR9DSST5xnhm4FxKSdeVRpOxuHhvk3JAVYvKNkZ8sJ85x7fo0O7DC6XtJq+0oy 2Cn3NLl5rbE4/657vgGFX76SqvCacyTPf38p7sbLqcHowpCg4Zynujn5sgMLV8wQKjl0 3ANWwTCIimKNXtcgwQyYT77RlAKN6s7e2rb4AvQwbKOm780cBPSyZ82ywv/A8wiLrny9 40CD7jijWSciuYY/inoNC57L66FyARy3CgJao9k+/Cu3HLroiJ6Yt6C2qg/5A2yK1R/D /ziJRm15SdXle9HEwOAewUAfDU7t51XqESkhaOUwiXGB4pM/MnYuajkWhBfb4F/IOevI XLhw== 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=ibMLS7XE9OSPpqCYhKQok/iLsFRuHzBDMKN5htDQnWw=; b=s1XDzREyXwpw6BYpezvNYVH1qeuAGe9porMYybwiDqCcAYikQnPDKSJLrjyPeNhgob kg2/7wIHZ+OHjYnQPXfps3VVQ0zKxWFTWBNwXTbAq3HKoaxVfx6x9nQRQKIy0esE2h5j vK56fvNbDG6tmqF8leHNe2iGHVpzyU4ynwZCUxEUohDCU5/0yZ0DvjdyN63QIqYCr5qM LXzVueq7YP+oe8b6q7o9J+5wCRRx5UD6G9TsuDEOIBEJfAASc/hDxeP4LNQecXJOLLxi RQEavR6eRHRJvK1+X3F36GXFBPYYM0noQ4xFd9BFmI2hpWNoE3s3oxZeHN/JmOwLjiAr d9eA== 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 t80si6928390pgb.69.2019.02.28.18.05.13; Thu, 28 Feb 2019 18:05:29 -0800 (PST) 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 S1733197AbfCABRS (ORCPT + 99 others); Thu, 28 Feb 2019 20:17:18 -0500 Received: from mga06.intel.com ([134.134.136.31]:11050 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727771AbfCABRS (ORCPT ); Thu, 28 Feb 2019 20:17:18 -0500 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Feb 2019 17:17:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,425,1544515200"; d="scan'208";a="323065276" Received: from ranerica-svr.sc.intel.com ([172.25.110.23]) by fmsmga006.fm.intel.com with ESMTP; 28 Feb 2019 17:17:17 -0800 Date: Thu, 28 Feb 2019 17:17:13 -0800 From: Ricardo Neri To: "Paul E. McKenney" Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Ashok Raj , Andi Kleen , Peter Zijlstra , "Ravi V. Shankar" , x86@kernel.org, linux-kernel@vger.kernel.org, Ricardo Neri , "H. Peter Anvin" , Tony Luck , "Rafael J. Wysocki" , Don Zickus , Nicholas Piggin , Michael Ellerman , Frederic Weisbecker , Alexei Starovoitov , Babu Moger , "David S. Miller" , Benjamin Herrenschmidt , Paul Mackerras , Mathieu Desnoyers , Masami Hiramatsu , Andrew Morton , Philippe Ombredanne , Colin Ian King , Byungchul Park , "Luis R. Rodriguez" , Waiman Long , Josh Poimboeuf , Randy Dunlap , Davidlohr Bueso , Christoffer Dall , Marc Zyngier , Kai-Heng Feng , Konrad Rzeszutek Wilk , David Rientjes , sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [RFC PATCH v2 09/14] watchdog/hardlockup: Make arch_touch_nmi_watchdog() to hpet-based implementation Message-ID: <20190301011713.GA8058@ranerica-svr.sc.intel.com> References: <1551283518-18922-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1551283518-18922-10-git-send-email-ricardo.neri-calderon@linux.intel.com> <20190227161758.GE4072@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190227161758.GE4072@linux.ibm.com> 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 Wed, Feb 27, 2019 at 08:17:58AM -0800, Paul E. McKenney wrote: > On Wed, Feb 27, 2019 at 08:05:13AM -0800, Ricardo Neri wrote: > > CPU architectures that have an NMI watchdog use arch_touch_nmi_watchdog() > > to briefly ignore the hardlockup detector. If the architecture does not > > have an NMI watchdog, one can be constructed using a source of non- > > maskable interrupts. In this case, arch_touch_nmi_watchdog() is common > > to any underlying hardware resource used to drive the detector and needs > > to be available to other kernel subsystems if hardware different from perf > > drives the detector. > > > > There exists perf-based and HPET-based implementations. Make it available > > to the latter. > > > > For clarity, wrap this function in a separate preprocessor conditional > > from functions which are truly specific to the perf-based implementation. > > > > Cc: "H. Peter Anvin" > > Cc: Ashok Raj > > Cc: Andi Kleen > > Cc: Tony Luck > > Cc: "Rafael J. Wysocki" > > Cc: Don Zickus > > Cc: Nicholas Piggin > > Cc: Michael Ellerman > > Cc: Frederic Weisbecker > > Cc: Alexei Starovoitov > > Cc: Babu Moger > > Cc: "David S. Miller" > > Cc: Benjamin Herrenschmidt > > Cc: Paul Mackerras > > Cc: Mathieu Desnoyers > > Cc: Masami Hiramatsu > > Cc: Peter Zijlstra > > Cc: Andrew Morton > > Cc: Philippe Ombredanne > > Cc: Colin Ian King > > Cc: Byungchul Park > > Cc: "Paul E. McKenney" > > Cc: "Luis R. Rodriguez" > > Cc: Waiman Long > > Cc: Josh Poimboeuf > > Cc: Randy Dunlap > > Cc: Davidlohr Bueso > > Cc: Christoffer Dall > > Cc: Marc Zyngier > > Cc: Kai-Heng Feng > > Cc: Konrad Rzeszutek Wilk > > Cc: David Rientjes > > Cc: "Ravi V. Shankar" > > Cc: x86@kernel.org > > Cc: sparclinux@vger.kernel.org > > Cc: linuxppc-dev@lists.ozlabs.org > > Signed-off-by: Ricardo Neri > > --- > > include/linux/nmi.h | 10 +++++++++- > > 1 file changed, 9 insertions(+), 1 deletion(-) > > > > diff --git a/include/linux/nmi.h b/include/linux/nmi.h > > index 5a8b19749769..bf5ebcfdd590 100644 > > --- a/include/linux/nmi.h > > +++ b/include/linux/nmi.h > > @@ -94,8 +94,16 @@ static inline void hardlockup_detector_disable(void) {} > > # define NMI_WATCHDOG_SYSCTL_PERM 0444 > > #endif > > > > -#if defined(CONFIG_HARDLOCKUP_DETECTOR_PERF) > > +#if defined(CONFIG_HARDLOCKUP_DETECTOR_PERF) || \ > > + defined(CONFIG_X86_HARDLOCKUP_DETECTOR_HPET) > > Why not instead make CONFIG_X86_HARDLOCKUP_DETECTOR_HPET select > CONFIG_HARDLOCKUP_DETECTOR_PERF? Keep the arch-specific details > in the arch-specific files and all that. Thanks for your feedback, Paul! The HPET implementation does not use perf. Thus, in my opinion is not correct for the HPET HLD to select the perf implementation. Patch 8 of this series splits the perf-specific code and the generic hardlockup detector code. Does this make sense? Thanks and BR, Ricardo