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 278CBC7EE2A for ; Fri, 12 May 2023 11:21:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241042AbjELLVy (ORCPT ); Fri, 12 May 2023 07:21:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44714 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241112AbjELLVt (ORCPT ); Fri, 12 May 2023 07:21:49 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 295C53C03; Fri, 12 May 2023 04:21:43 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id AA27E228E0; Fri, 12 May 2023 11:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1683890501; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8Mll1DAMbLGCFXSubtx4QEn03KKOCJspxVpDzXoQOQ4=; b=KpIW+Hu8ySVymSB28TiB64CYpeKVwXlVWvacchzaLtI9q7FObkmBCPO2LZ7HOgvYh0awWb Vu/XmXFI2k4C5E7HKbYqv+kv7F2CMc4cHuQv9iabvQkMtDDbD2aVX1La9fkct2gRNR0/Iu dWM7bdtfBmqRCNU9EtJIGZIfqdvJIxc= Received: from suse.cz (pmladek.tcp.ovpn2.prg.suse.de [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A80022C152; Fri, 12 May 2023 11:21:37 +0000 (UTC) Date: Fri, 12 May 2023 13:21:34 +0200 From: Petr Mladek To: Nicholas Piggin Cc: Douglas Anderson , Andrew Morton , Sumit Garg , Mark Rutland , Matthias Kaehlcke , Stephane Eranian , Stephen Boyd , ricardo.neri@intel.com, Tzung-Bi Shih , Lecopzer Chen , kgdb-bugreport@lists.sourceforge.net, Masayoshi Mizuma , Guenter Roeck , Pingfan Liu , Andi Kleen , Ian Rogers , linux-arm-kernel@lists.infradead.org, linux-perf-users@vger.kernel.org, ito-yuichi@fujitsu.com, Randy Dunlap , Chen-Yu Tsai , christophe.leroy@csgroup.eu, davem@davemloft.net, sparclinux@vger.kernel.org, mpe@ellerman.id.au, Will Deacon , ravi.v.shankar@intel.com, linuxppc-dev@lists.ozlabs.org, Marc Zyngier , Catalin Marinas , Daniel Thompson Subject: Re: [PATCH v4 11/17] watchdog/hardlockup: Rename some "NMI watchdog" constants/function Message-ID: References: <20230504221349.1535669-1-dianders@chromium.org> <20230504151100.v4.11.I91f7277bab4bf8c0cb238732ed92e7ce7bbd71a6@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org On Fri 2023-05-05 13:06:41, Nicholas Piggin wrote: > On Fri May 5, 2023 at 8:13 AM AEST, Douglas Anderson wrote: > > Do a search and replace of: > > - NMI_WATCHDOG_ENABLED => HARD_WATCHDOG_ENABLED > > - watchdog_nmi_ => watchdog_hardlockup_ > > These are just making prefixes inconsistent again. Yeah, HARD_WATCHDOG_ENABLED does not fit in. I would personally rename: - NMI_WATCHDOG_ENABLED => WATCHDOG_HARDLOCKUP_ENABLED - SOFT_WATCHDOG_ENABLED => WATCHDOG_SOFTOCKUP_ENABLED to follow the new name space. > If you really want to do a prefix, I would call it hardlockup which I wish, we found a good short prefix. My problem with hardlockup_ is that for example "hardlockup_enable() looks ugly. Also some stuff is common for both softlockup and hardlockup detectors. And some stuff will be common for both perf and buddy hardlockup detectors. Possible alternatives: a) watchdog_, watchdog_sl_ and watchdog_hl_, watchdog_hl_buddy_ b) wd_, wd_hardlockup_, wd_softlockup_, wd_hardlockup_buddy_ c) wd_, wd_hl_, wd_sl_, wd_hl_buddy_ d_ wd_, wdhl_, wdsl_, wdhl_buddy_ If you want something shorter then c) looks the best to me. The wd_ prefix seems to be already used in: + arch/powerpc/kernel/watchdog.c + kernel/time/clocksource.c , but it is not used in the core watchdog code at all so it would require renaming almost everything. > probably best matches existing code and sysctl / boot stuff, and > concentrate on non-static symbols. Yeah, we could hardly change the sysctl interface visible to userspace. But we could change at least the internal code. And if we are changing the API anyway because of the nmi/perf/buddy/hardlockup/hard mess then lets choose something that will help to distinguish the common watchdog vs. softlockup/hardlockup/buddy/perf-specific watchdog code. And I would change it to the watchdog_hardlockup_ as it is done in this patchset: + the names were mostly long even before + the code mostly stayed within the 80-chars per-line limit + the patches are ready > No problem with minor things like this that touch arch/powerpc > going through Andrew's tree though. I'm sure sparc maintainers > wouldn't mind either. Good to know. Best Regards, Petr 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 3BE3BC77B7F for ; Fri, 12 May 2023 11:22:38 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4QHmZh3m35z3fYC for ; Fri, 12 May 2023 21:22:36 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=KpIW+Hu8; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=suse.com (client-ip=195.135.220.28; helo=smtp-out1.suse.de; envelope-from=pmladek@suse.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=susede1 header.b=KpIW+Hu8; dkim-atps=neutral Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 4QHmYk5T03z2xYL for ; Fri, 12 May 2023 21:21:45 +1000 (AEST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id AA27E228E0; Fri, 12 May 2023 11:21:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1683890501; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=8Mll1DAMbLGCFXSubtx4QEn03KKOCJspxVpDzXoQOQ4=; b=KpIW+Hu8ySVymSB28TiB64CYpeKVwXlVWvacchzaLtI9q7FObkmBCPO2LZ7HOgvYh0awWb Vu/XmXFI2k4C5E7HKbYqv+kv7F2CMc4cHuQv9iabvQkMtDDbD2aVX1La9fkct2gRNR0/Iu dWM7bdtfBmqRCNU9EtJIGZIfqdvJIxc= Received: from suse.cz (pmladek.tcp.ovpn2.prg.suse.de [10.100.208.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id A80022C152; Fri, 12 May 2023 11:21:37 +0000 (UTC) Date: Fri, 12 May 2023 13:21:34 +0200 From: Petr Mladek To: Nicholas Piggin Subject: Re: [PATCH v4 11/17] watchdog/hardlockup: Rename some "NMI watchdog" constants/function Message-ID: References: <20230504221349.1535669-1-dianders@chromium.org> <20230504151100.v4.11.I91f7277bab4bf8c0cb238732ed92e7ce7bbd71a6@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 , sparclinux@vger.kernel.org, Guenter Roeck , 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, Douglas Anderson , linux-perf-users@vger.kernel.org, Marc Zyngier , Andrew Morton , 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 2023-05-05 13:06:41, Nicholas Piggin wrote: > On Fri May 5, 2023 at 8:13 AM AEST, Douglas Anderson wrote: > > Do a search and replace of: > > - NMI_WATCHDOG_ENABLED => HARD_WATCHDOG_ENABLED > > - watchdog_nmi_ => watchdog_hardlockup_ > > These are just making prefixes inconsistent again. Yeah, HARD_WATCHDOG_ENABLED does not fit in. I would personally rename: - NMI_WATCHDOG_ENABLED => WATCHDOG_HARDLOCKUP_ENABLED - SOFT_WATCHDOG_ENABLED => WATCHDOG_SOFTOCKUP_ENABLED to follow the new name space. > If you really want to do a prefix, I would call it hardlockup which I wish, we found a good short prefix. My problem with hardlockup_ is that for example "hardlockup_enable() looks ugly. Also some stuff is common for both softlockup and hardlockup detectors. And some stuff will be common for both perf and buddy hardlockup detectors. Possible alternatives: a) watchdog_, watchdog_sl_ and watchdog_hl_, watchdog_hl_buddy_ b) wd_, wd_hardlockup_, wd_softlockup_, wd_hardlockup_buddy_ c) wd_, wd_hl_, wd_sl_, wd_hl_buddy_ d_ wd_, wdhl_, wdsl_, wdhl_buddy_ If you want something shorter then c) looks the best to me. The wd_ prefix seems to be already used in: + arch/powerpc/kernel/watchdog.c + kernel/time/clocksource.c , but it is not used in the core watchdog code at all so it would require renaming almost everything. > probably best matches existing code and sysctl / boot stuff, and > concentrate on non-static symbols. Yeah, we could hardly change the sysctl interface visible to userspace. But we could change at least the internal code. And if we are changing the API anyway because of the nmi/perf/buddy/hardlockup/hard mess then lets choose something that will help to distinguish the common watchdog vs. softlockup/hardlockup/buddy/perf-specific watchdog code. And I would change it to the watchdog_hardlockup_ as it is done in this patchset: + the names were mostly long even before + the code mostly stayed within the 80-chars per-line limit + the patches are ready > No problem with minor things like this that touch arch/powerpc > going through Andrew's tree though. I'm sure sparc maintainers > wouldn't mind either. Good to know. Best Regards, Petr