From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3B7D4C7EE23 for ; Fri, 5 May 2023 02:51:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230061AbjEECv1 (ORCPT ); Thu, 4 May 2023 22:51:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbjEECv0 (ORCPT ); Thu, 4 May 2023 22:51:26 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 606A6120B9; Thu, 4 May 2023 19:51:24 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-64115eef620so16690154b3a.1; Thu, 04 May 2023 19:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683255084; x=1685847084; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gVzHKIeVTs5o2uUKP+mQkds3ksDwFVvhqkKafztg4+4=; b=ktqHNk5loLtU/KCwR//Z7tYcVQSm8JM7u7EDXu2OxKQQsBws43LRUPjwNVbUHAGJBj gc3DxpQtC1/OOyHW26dX3MwFbgdfWwpOVxdtbuQThRVEzgfI1BNUZ5OhrxthomwTTvW9 KuWgSVznYjqLHRiyHmWJk+LT2L2s0ufFsPGG+IURgPieshXMcNyyDt/Kzo+DCv0xKjZe DyDKfQZeNNs/8VMonmfGERnmO5tTqr0eHZh+Y875AJRCzvNs9yxUih9l0rhqWFmBJrRo cV/9lUiVQ0pbHb4cFF5mCXAHtl60nbslHtAtfWdEsj03EbDyIlSOcirz6VnmjBK9H4/J ow4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683255084; x=1685847084; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gVzHKIeVTs5o2uUKP+mQkds3ksDwFVvhqkKafztg4+4=; b=FPSOrNZxM2XVbwmJ09iFGO1aWAquy5LHRUlXjiduGkuOWU7kOyZ34C/ElMMsEcwZj1 bW+kfpZvmzwO6GANy3aPUe8Rw9e/jMKOn9SlLOEw+QSJxLd4P79hsc6FgcFDrW++uKuX zbpdyJ7o/sWVzt42+/2qHoMhnFq6YEtHTv8mk2FxEas/g36AkdQqjZ1R4DgtjZ0N2t6n y/yIRJj7CTnIbDIozrKrgfCYRIRjj3iyZy7wJnAqMZZ1/1rF4dhDFR5RSTuMwT2wGY2a XdupCLGtJbfEKmzhBczkojB/zohaySLxU4+Ue7kzUgpxCx5WQXh76A8H9iLl7wqfuBj6 fP7g== X-Gm-Message-State: AC+VfDyZmaWOSQiX9iEvXDw/YCTbK6/rozSAUOGJZzuzv/kAtAcwvomP M6b9bJMbmKd0IrhlIehLGh4= X-Google-Smtp-Source: ACHHUZ5BRoOs+9WXOczfgGoXbf4YZMUc/Uu5++G5XcOuyogjStZoqiKceepZC/RfSwAcQqdM6F1UUg== X-Received: by 2002:a17:902:d48e:b0:1a9:68d2:e4ae with SMTP id c14-20020a170902d48e00b001a968d2e4aemr6701878plg.2.1683255083704; Thu, 04 May 2023 19:51:23 -0700 (PDT) Received: from localhost ([203.59.190.92]) by smtp.gmail.com with ESMTPSA id t4-20020a170902bc4400b001ab29e002fbsm367141plz.17.2023.05.04.19.51.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 May 2023 19:51:23 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 05 May 2023 12:51:06 +1000 Message-Id: From: "Nicholas Piggin" To: "Douglas Anderson" , "Petr Mladek" , "Andrew Morton" Cc: "Sumit Garg" , "Mark Rutland" , "Matthias Kaehlcke" , "Stephane Eranian" , "Stephen Boyd" , , "Tzung-Bi Shih" , "Lecopzer Chen" , , "Masayoshi Mizuma" , "Guenter Roeck" , "Pingfan Liu" , "Andi Kleen" , "Ian Rogers" , , , , "Randy Dunlap" , "Chen-Yu Tsai" , , , , , "Will Deacon" , , , "Marc Zyngier" , "Catalin Marinas" , "Daniel Thompson" Subject: Re: [PATCH v4 05/17] watchdog/hardlockup: Rename touch_nmi_watchdog() to touch_hardlockup_watchdog() X-Mailer: aerc 0.14.0 References: <20230504221349.1535669-1-dianders@chromium.org> <20230504151100.v4.5.I4e47cbfa1bb2ebbcdb5ca16817aa2887f15dc82c@changeid> In-Reply-To: <20230504151100.v4.5.I4e47cbfa1bb2ebbcdb5ca16817aa2887f15dc82c@changeid> Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Fri May 5, 2023 at 8:13 AM AEST, Douglas Anderson wrote: > In preparation for the buddy hardlockup detector, rename > touch_nmi_watchdog() to touch_hardlockup_watchdog() to make it clear > that it will touch whatever hardlockup detector is configured. We'll > add a #define for the old name (touch_nmi_watchdog) so that we don't > have to touch every piece of code referring to the old name. Is this really helpful? Now it's got two names Could just leave it. If you insist then it'd be better just to rename everything in one go at the end of a merge window IMO. Conflicts would be trivial. > Ideally this change would also rename the arch_touch_nmi_watchdog(), > but that is harder since arch_touch_nmi_watchdog() is exported with > EXPORT_SYMBOL() and thus is ABI. Add a comment next to the call to > hopefully alleviate some of the confusion here. We don't keep ABI fixed upstream. Thanks, Nick > > Signed-off-by: Douglas Anderson > --- > > Changes in v4: > - ("Rename touch_nmi_watchdog() to ...") new for v4. > > include/linux/nmi.h | 27 ++++++++++++++++++++++----- > 1 file changed, 22 insertions(+), 5 deletions(-) > > diff --git a/include/linux/nmi.h b/include/linux/nmi.h > index 454fe99c4874..35d09d70f394 100644 > --- a/include/linux/nmi.h > +++ b/include/linux/nmi.h > @@ -125,18 +125,35 @@ void watchdog_nmi_disable(unsigned int cpu); > void lockup_detector_reconfigure(void); > =20 > /** > - * touch_nmi_watchdog - restart NMI watchdog timeout. > + * touch_hardlockup_watchdog - manually pet the hardlockup watchdog. > * > - * If the architecture supports the NMI watchdog, touch_nmi_watchdog() > - * may be used to reset the timeout - for code which intentionally > - * disables interrupts for a long time. This call is stateless. > + * If we support detecting hardlockups, touch_hardlockup_watchdog() may = be > + * used to pet the watchdog (reset the timeout) - for code which > + * intentionally disables interrupts for a long time. This call is state= less. > */ > -static inline void touch_nmi_watchdog(void) > +static inline void touch_hardlockup_watchdog(void) > { > + /* > + * Pass on to the hardlockup detector selected via CONFIG_. Note that > + * the hardlockup detector may not be arch-specific nor using NMIs, > + * but arch_touch_nmi_watchdog() is exported with EXPORT_SYMBOL() and > + * is thus ABI. > + */ > arch_touch_nmi_watchdog(); > + > + /* > + * Touching the hardlock detector implcitily pets the > + * softlockup detector too > + */ > touch_softlockup_watchdog(); > } > =20 > +/* > + * It's encouraged for code to refer to the new name, but allow the old > + * name as well. > + */ > +#define touch_nmi_watchdog touch_hardlockup_watchdog > + > /* > * Create trigger_all_cpu_backtrace() out of the arch-provided > * base function. Return whether such support was available, > --=20 > 2.40.1.521.gf1e218fcd8-goog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9B776C77B73 for ; Fri, 5 May 2023 02:52:17 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4QCFb40rs1z3f5K for ; Fri, 5 May 2023 12:52:16 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=ktqHNk5l; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gmail.com (client-ip=2607:f8b0:4864:20::42f; helo=mail-pf1-x42f.google.com; envelope-from=npiggin@gmail.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=ktqHNk5l; dkim-atps=neutral Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4QCFZ752ksz2xGq for ; Fri, 5 May 2023 12:51:26 +1000 (AEST) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-64115e652eeso16804068b3a.0 for ; Thu, 04 May 2023 19:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683255084; x=1685847084; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gVzHKIeVTs5o2uUKP+mQkds3ksDwFVvhqkKafztg4+4=; b=ktqHNk5loLtU/KCwR//Z7tYcVQSm8JM7u7EDXu2OxKQQsBws43LRUPjwNVbUHAGJBj gc3DxpQtC1/OOyHW26dX3MwFbgdfWwpOVxdtbuQThRVEzgfI1BNUZ5OhrxthomwTTvW9 KuWgSVznYjqLHRiyHmWJk+LT2L2s0ufFsPGG+IURgPieshXMcNyyDt/Kzo+DCv0xKjZe DyDKfQZeNNs/8VMonmfGERnmO5tTqr0eHZh+Y875AJRCzvNs9yxUih9l0rhqWFmBJrRo cV/9lUiVQ0pbHb4cFF5mCXAHtl60nbslHtAtfWdEsj03EbDyIlSOcirz6VnmjBK9H4/J ow4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683255084; x=1685847084; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gVzHKIeVTs5o2uUKP+mQkds3ksDwFVvhqkKafztg4+4=; b=N+qSUxkyA9PtRbPGjOQliD+sl85yj/Asr8JU5nuFw4lbKHk8s4ffzqqTh/7pnuOFiT Z5bhTYmuUCosbqurbm0WZZ5nm5Cb/cb2i3ZhaTHK/R4dXgEePaKP+TmeBMtFaTu9psDe jbgnlzXbCJXUB+fQZhLicv+CcfVV8ICCX8kIPdSXY6mTkr3JNd+3Jjr4RGhdjwbkFCbX YRBHJ8e0dXIWRBAYZJpqsDpz9U42AJEfY1bqqGR2YSA+LAyF8qZr/QPyYznSE0r4R8at UtkJJOc8m0rA0BfgaCHysLeZTVg2NaMcAPnepP9zs0Ann5X13gDRK3CDw9ICHoJrlcUj B5fg== X-Gm-Message-State: AC+VfDxSkGA2gnWnQH3mONvS3PdVTjb+u053ZVKhvH//vnFhzsilZ9Pc 2YP0oslKhp+ljsXR6LhqRy0= X-Google-Smtp-Source: ACHHUZ5BRoOs+9WXOczfgGoXbf4YZMUc/Uu5++G5XcOuyogjStZoqiKceepZC/RfSwAcQqdM6F1UUg== X-Received: by 2002:a17:902:d48e:b0:1a9:68d2:e4ae with SMTP id c14-20020a170902d48e00b001a968d2e4aemr6701878plg.2.1683255083704; Thu, 04 May 2023 19:51:23 -0700 (PDT) Received: from localhost ([203.59.190.92]) by smtp.gmail.com with ESMTPSA id t4-20020a170902bc4400b001ab29e002fbsm367141plz.17.2023.05.04.19.51.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 May 2023 19:51:23 -0700 (PDT) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 05 May 2023 12:51:06 +1000 Message-Id: From: "Nicholas Piggin" To: "Douglas Anderson" , "Petr Mladek" , "Andrew Morton" Subject: Re: [PATCH v4 05/17] watchdog/hardlockup: Rename touch_nmi_watchdog() to touch_hardlockup_watchdog() X-Mailer: aerc 0.14.0 References: <20230504221349.1535669-1-dianders@chromium.org> <20230504151100.v4.5.I4e47cbfa1bb2ebbcdb5ca16817aa2887f15dc82c@changeid> In-Reply-To: <20230504151100.v4.5.I4e47cbfa1bb2ebbcdb5ca16817aa2887f15dc82c@changeid> X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Ian Rogers , Randy Dunlap , Lecopzer Chen , kgdb-bugreport@lists.sourceforge.net, ricardo.neri@intel.com, Stephane Eranian , Guenter Roeck , sparclinux@vger.kernel.org, Will Deacon , Daniel Thompson , Andi Kleen , Chen-Yu Tsai , Matthias Kaehlcke , Catalin Marinas , Masayoshi Mizuma , ravi.v.shankar@intel.com, Tzung-Bi Shih , Stephen Boyd , Pingfan Liu , linux-arm-kernel@lists.infradead.org, Sumit Garg , ito-yuichi@fujitsu.com, linux-perf-users@vger.kernel.org, Marc Zyngier , linuxppc-dev@lists.ozlabs.org, davem@davemloft.net Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On Fri May 5, 2023 at 8:13 AM AEST, Douglas Anderson wrote: > In preparation for the buddy hardlockup detector, rename > touch_nmi_watchdog() to touch_hardlockup_watchdog() to make it clear > that it will touch whatever hardlockup detector is configured. We'll > add a #define for the old name (touch_nmi_watchdog) so that we don't > have to touch every piece of code referring to the old name. Is this really helpful? Now it's got two names Could just leave it. If you insist then it'd be better just to rename everything in one go at the end of a merge window IMO. Conflicts would be trivial. > Ideally this change would also rename the arch_touch_nmi_watchdog(), > but that is harder since arch_touch_nmi_watchdog() is exported with > EXPORT_SYMBOL() and thus is ABI. Add a comment next to the call to > hopefully alleviate some of the confusion here. We don't keep ABI fixed upstream. Thanks, Nick > > Signed-off-by: Douglas Anderson > --- > > Changes in v4: > - ("Rename touch_nmi_watchdog() to ...") new for v4. > > include/linux/nmi.h | 27 ++++++++++++++++++++++----- > 1 file changed, 22 insertions(+), 5 deletions(-) > > diff --git a/include/linux/nmi.h b/include/linux/nmi.h > index 454fe99c4874..35d09d70f394 100644 > --- a/include/linux/nmi.h > +++ b/include/linux/nmi.h > @@ -125,18 +125,35 @@ void watchdog_nmi_disable(unsigned int cpu); > void lockup_detector_reconfigure(void); > =20 > /** > - * touch_nmi_watchdog - restart NMI watchdog timeout. > + * touch_hardlockup_watchdog - manually pet the hardlockup watchdog. > * > - * If the architecture supports the NMI watchdog, touch_nmi_watchdog() > - * may be used to reset the timeout - for code which intentionally > - * disables interrupts for a long time. This call is stateless. > + * If we support detecting hardlockups, touch_hardlockup_watchdog() may = be > + * used to pet the watchdog (reset the timeout) - for code which > + * intentionally disables interrupts for a long time. This call is state= less. > */ > -static inline void touch_nmi_watchdog(void) > +static inline void touch_hardlockup_watchdog(void) > { > + /* > + * Pass on to the hardlockup detector selected via CONFIG_. Note that > + * the hardlockup detector may not be arch-specific nor using NMIs, > + * but arch_touch_nmi_watchdog() is exported with EXPORT_SYMBOL() and > + * is thus ABI. > + */ > arch_touch_nmi_watchdog(); > + > + /* > + * Touching the hardlock detector implcitily pets the > + * softlockup detector too > + */ > touch_softlockup_watchdog(); > } > =20 > +/* > + * It's encouraged for code to refer to the new name, but allow the old > + * name as well. > + */ > +#define touch_nmi_watchdog touch_hardlockup_watchdog > + > /* > * Create trigger_all_cpu_backtrace() out of the arch-provided > * base function. Return whether such support was available, > --=20 > 2.40.1.521.gf1e218fcd8-goog From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9CBC9C77B7C for ; Fri, 5 May 2023 02:52:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Subject:Cc:To: From:Message-Id:Date:Mime-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AL5cVa5ejUbfrBo0os1HxxFyRDaLvsDjq9MabuOLM5U=; b=tqlRS7IQt02wer ArOdhtDQhTqPqRnL3FVcwab/LVUQHgOd06XpIJmnes3d6vdebXj8Q0JLXowwab4q3f03kvsyYVGxs fgnpKHOV4O87drqTLGU/uUluDqFRClGB8H0QS3WQ9yQj011MnMrmL6sF7WLbiT9ZNDKrpKsreH9YC gG7PI/bJvSDjlP97y8HJRtghTJj0tPRB/8j/C9tLN8pWBG6obMVcn0rz+e8f8GjOAbDet1AgP0Zth V6sy7aZqRYXgDJYR1oqAuxlBCs7cNxUWfttTJlmMYFKLoYaSkNR9kn7SsWLSwtJ7a3ZolfCc0m/+u SykSgEYqBsTDrVSe2vBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pulXc-009Zko-0y; Fri, 05 May 2023 02:51:28 +0000 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pulXZ-009Zjy-1F for linux-arm-kernel@lists.infradead.org; Fri, 05 May 2023 02:51:26 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-64115eef620so16690152b3a.1 for ; Thu, 04 May 2023 19:51:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683255084; x=1685847084; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=gVzHKIeVTs5o2uUKP+mQkds3ksDwFVvhqkKafztg4+4=; b=ktqHNk5loLtU/KCwR//Z7tYcVQSm8JM7u7EDXu2OxKQQsBws43LRUPjwNVbUHAGJBj gc3DxpQtC1/OOyHW26dX3MwFbgdfWwpOVxdtbuQThRVEzgfI1BNUZ5OhrxthomwTTvW9 KuWgSVznYjqLHRiyHmWJk+LT2L2s0ufFsPGG+IURgPieshXMcNyyDt/Kzo+DCv0xKjZe DyDKfQZeNNs/8VMonmfGERnmO5tTqr0eHZh+Y875AJRCzvNs9yxUih9l0rhqWFmBJrRo cV/9lUiVQ0pbHb4cFF5mCXAHtl60nbslHtAtfWdEsj03EbDyIlSOcirz6VnmjBK9H4/J ow4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683255084; x=1685847084; h=in-reply-to:references:subject:cc:to:from:message-id:date :content-transfer-encoding:mime-version:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=gVzHKIeVTs5o2uUKP+mQkds3ksDwFVvhqkKafztg4+4=; b=KaLxcekufaEM7EIQpIGLz8Xo0eic66SgYks/lTV94rPmgCcBSmBfc0lSXhVcbhto/J fBQSTjNFs+4uF4firVOtsuojTCxndsY6YuujjxdDuuQvkHCSLuTsGSbwSLstODVkmGkT 64PbcDG/Tk58MuibITZr7ZU6XFupQdXX1yL82xqAIl9HKhH6IBxs4ItI8/ulYSQehjhp +tEhhS+UQtkEKhO+uXzvx7ao0kuVqnz10NAyUnPOCLGb6y9+m6e5HMFqiLwSXJBpuX8o 4kv1AFpDS+bpNpfpk/TMRXcO/cvEsaXennl0Lj7JQjl3ScAqaDkB/xadvXyBmzDEaPCQ HB+Q== X-Gm-Message-State: AC+VfDxwk0Y0RfLxpziGAdyORjiwubU9uQIgU35iNJ+XqkgBp/6WT+PQ E2E//1k0R3dWPf9qymBTuNA= X-Google-Smtp-Source: ACHHUZ5BRoOs+9WXOczfgGoXbf4YZMUc/Uu5++G5XcOuyogjStZoqiKceepZC/RfSwAcQqdM6F1UUg== X-Received: by 2002:a17:902:d48e:b0:1a9:68d2:e4ae with SMTP id c14-20020a170902d48e00b001a968d2e4aemr6701878plg.2.1683255083704; Thu, 04 May 2023 19:51:23 -0700 (PDT) Received: from localhost ([203.59.190.92]) by smtp.gmail.com with ESMTPSA id t4-20020a170902bc4400b001ab29e002fbsm367141plz.17.2023.05.04.19.51.09 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 04 May 2023 19:51:23 -0700 (PDT) Mime-Version: 1.0 Date: Fri, 05 May 2023 12:51:06 +1000 Message-Id: From: "Nicholas Piggin" To: "Douglas Anderson" , "Petr Mladek" , "Andrew Morton" Cc: "Sumit Garg" , "Mark Rutland" , "Matthias Kaehlcke" , "Stephane Eranian" , "Stephen Boyd" , , "Tzung-Bi Shih" , "Lecopzer Chen" , , "Masayoshi Mizuma" , "Guenter Roeck" , "Pingfan Liu" , "Andi Kleen" , "Ian Rogers" , , , , "Randy Dunlap" , "Chen-Yu Tsai" , , , , , "Will Deacon" , , , "Marc Zyngier" , "Catalin Marinas" , "Daniel Thompson" Subject: Re: [PATCH v4 05/17] watchdog/hardlockup: Rename touch_nmi_watchdog() to touch_hardlockup_watchdog() X-Mailer: aerc 0.14.0 References: <20230504221349.1535669-1-dianders@chromium.org> <20230504151100.v4.5.I4e47cbfa1bb2ebbcdb5ca16817aa2887f15dc82c@changeid> In-Reply-To: <20230504151100.v4.5.I4e47cbfa1bb2ebbcdb5ca16817aa2887f15dc82c@changeid> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230504_195125_429688_4D8AC0DF X-CRM114-Status: GOOD ( 30.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri May 5, 2023 at 8:13 AM AEST, Douglas Anderson wrote: > In preparation for the buddy hardlockup detector, rename > touch_nmi_watchdog() to touch_hardlockup_watchdog() to make it clear > that it will touch whatever hardlockup detector is configured. We'll > add a #define for the old name (touch_nmi_watchdog) so that we don't > have to touch every piece of code referring to the old name. Is this really helpful? Now it's got two names Could just leave it. If you insist then it'd be better just to rename everything in one go at the end of a merge window IMO. Conflicts would be trivial. > Ideally this change would also rename the arch_touch_nmi_watchdog(), > but that is harder since arch_touch_nmi_watchdog() is exported with > EXPORT_SYMBOL() and thus is ABI. Add a comment next to the call to > hopefully alleviate some of the confusion here. We don't keep ABI fixed upstream. Thanks, Nick > > Signed-off-by: Douglas Anderson > --- > > Changes in v4: > - ("Rename touch_nmi_watchdog() to ...") new for v4. > > include/linux/nmi.h | 27 ++++++++++++++++++++++----- > 1 file changed, 22 insertions(+), 5 deletions(-) > > diff --git a/include/linux/nmi.h b/include/linux/nmi.h > index 454fe99c4874..35d09d70f394 100644 > --- a/include/linux/nmi.h > +++ b/include/linux/nmi.h > @@ -125,18 +125,35 @@ void watchdog_nmi_disable(unsigned int cpu); > void lockup_detector_reconfigure(void); > > /** > - * touch_nmi_watchdog - restart NMI watchdog timeout. > + * touch_hardlockup_watchdog - manually pet the hardlockup watchdog. > * > - * If the architecture supports the NMI watchdog, touch_nmi_watchdog() > - * may be used to reset the timeout - for code which intentionally > - * disables interrupts for a long time. This call is stateless. > + * If we support detecting hardlockups, touch_hardlockup_watchdog() may be > + * used to pet the watchdog (reset the timeout) - for code which > + * intentionally disables interrupts for a long time. This call is stateless. > */ > -static inline void touch_nmi_watchdog(void) > +static inline void touch_hardlockup_watchdog(void) > { > + /* > + * Pass on to the hardlockup detector selected via CONFIG_. Note that > + * the hardlockup detector may not be arch-specific nor using NMIs, > + * but arch_touch_nmi_watchdog() is exported with EXPORT_SYMBOL() and > + * is thus ABI. > + */ > arch_touch_nmi_watchdog(); > + > + /* > + * Touching the hardlock detector implcitily pets the > + * softlockup detector too > + */ > touch_softlockup_watchdog(); > } > > +/* > + * It's encouraged for code to refer to the new name, but allow the old > + * name as well. > + */ > +#define touch_nmi_watchdog touch_hardlockup_watchdog > + > /* > * Create trigger_all_cpu_backtrace() out of the arch-provided > * base function. Return whether such support was available, > -- > 2.40.1.521.gf1e218fcd8-goog _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel