Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp9376294rwr; Thu, 11 May 2023 14:06:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7HcYmIiUI9PnrMvaAqRW7aSJK3n6sdA3CmNXEgmhlrJH+BP7v/OW3UI2fw+h2Qtswl+0bq X-Received: by 2002:a05:6a20:8f08:b0:102:472b:424c with SMTP id b8-20020a056a208f0800b00102472b424cmr10000414pzk.22.1683839200124; Thu, 11 May 2023 14:06:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683839200; cv=none; d=google.com; s=arc-20160816; b=IG+sZqHcwC+OhTkWWRUTUdIv3VwkgiCjAXp32t4rd4+yIcJZ4rEqoQEntBNzh3e1Jf 3oo/7e6/DfOKMMZVt4dlZ62Z+4AG+Iy9LuCc6G2iDjX7rbsDiE9afmQdklWuRbdq4s5U cRsglW3BOPEId4oAs/Uy7ALNnhjBwGEodxqgV6yX3FcqhoG+gUvBFIZvHa++Wja/HIs9 snouJIVSnCUmfwaT+9kaFEB7JJnIKJwTpm5YgytKnLj/HyIneuBBaTU6Z/BUPpqMixIi K/MKWy9wJWgzlhgN/ESS/0wFSE0ZgaFMGcZknh4p9Gxt9QUL1KZ7wj4g0LnOYjwTvVUw InLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=bx4ls+PjEuZCHC9PmdpTgSCNrFh+f5FxaEmIYcj3rhI=; b=HjQ9Gp7RNwj0npZ4e+kyAVKwH6cqpiUQ91w976CLSGswsbUGcxNTZJNWQhTWFKf3IR B49law1adPLSlVtJS8rsTpk0GbApcz/maA8t4CdUcHtIU3ekYXY07mkCVZOy9eO316vU aGLkkeorVd0hMG3J0B20fkmI0hwCGOgmF/EG6z63KRzzf69QGrFFbdqpmnrT0NJ1uDGh jihEA0YyCNvlICN6a54xDDL/dq7DBYXCyPdglIFyIxRqo+So8WHOG4Uh9NcJuUKhDEyW 7Z9IX9cY6+CWODhhZTudxtR+yf/Si8jRxPitqx6IgrZVy7Lu2s9psTBGBTbBVBUHu28W 64bQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X8h2AOfJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 65-20020a630244000000b00524b0295005si7427013pgc.558.2023.05.11.14.06.28; Thu, 11 May 2023 14:06:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=X8h2AOfJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239259AbjEKU3I (ORCPT + 99 others); Thu, 11 May 2023 16:29:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37792 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239160AbjEKU3G (ORCPT ); Thu, 11 May 2023 16:29:06 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A13EC6E90; Thu, 11 May 2023 13:29:05 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3571B65160; Thu, 11 May 2023 20:29:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D385C433D2; Thu, 11 May 2023 20:29:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683836944; bh=tTH7rKHrO5TIvduxYxjfHjNjYXZc1hEYflMKrrUL640=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=X8h2AOfJuljQNpl0ZblXP97y2wFv4xnVU+D9s9+lU3ZqXA4FN9+JeWdNGaFk6tRMP pO6teecBZ+CJWvKQ96IzJucHL43WZVGAbfS+mhcrDmQmU9xZCefvV2hbFkjwKB1VPT XYawbcFO6k39fRsfZ1pQcbu8frcKvlhK54vePVoDkPgepmz/YXLvYQocqmNrA33kIO KxWnpLI8t4fQWRmTfcAha9PezZQLAWoe2Tx7FxAj2VVQhxDnZvVU9IXksbsL/7Iq0d jrtbaYCUE/dJmUO2MvhQ+ZHazveKP5fTAmhA8Bh49OWRCzspk12KrI1vpOH69BP75C AahyxQ83PZmwA== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id 297ECCE0FED; Thu, 11 May 2023 13:29:04 -0700 (PDT) Date: Thu, 11 May 2023 13:29:04 -0700 From: "Paul E. McKenney" To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, x86@kernel.org, akiyks@gmail.com, linux-doc@vger.kernel.org, kernel-team@meta.com, Will Deacon , Boqun Feng , Mark Rutland Subject: Re: [PATCH locking/atomic 18/19] locking/atomic: Refrain from generating duplicate fallback kernel-doc Message-ID: Reply-To: paulmck@kernel.org References: <19135936-06d7-4705-8bc8-bb31c2a478ca@paulmck-laptop> <20230510181717.2200934-18-paulmck@kernel.org> <20230511201837.GD2296992@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230511201837.GD2296992@hirez.programming.kicks-ass.net> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 11, 2023 at 10:18:37PM +0200, Peter Zijlstra wrote: > On Wed, May 10, 2023 at 11:17:16AM -0700, Paul E. McKenney wrote: > > The gen-atomics.sh script currently generates 42 duplicate definitions: > > > > arch_atomic64_add_negative > > arch_atomic64_add_negative_acquire > > arch_atomic64_add_negative_release > > arch_atomic64_dec_return > > arch_atomic64_dec_return_acquire > > arch_atomic64_dec_return_release > > arch_atomic64_fetch_andnot > > arch_atomic64_fetch_andnot_acquire > > arch_atomic64_fetch_andnot_release > > arch_atomic64_fetch_dec > > arch_atomic64_fetch_dec_acquire > > arch_atomic64_fetch_dec_release > > arch_atomic64_fetch_inc > > arch_atomic64_fetch_inc_acquire > > arch_atomic64_fetch_inc_release > > arch_atomic64_inc_return > > arch_atomic64_inc_return_acquire > > arch_atomic64_inc_return_release > > arch_atomic64_try_cmpxchg > > arch_atomic64_try_cmpxchg_acquire > > arch_atomic64_try_cmpxchg_release > > arch_atomic_add_negative > > arch_atomic_add_negative_acquire > > arch_atomic_add_negative_release > > arch_atomic_dec_return > > arch_atomic_dec_return_acquire > > arch_atomic_dec_return_release > > arch_atomic_fetch_andnot > > arch_atomic_fetch_andnot_acquire > > arch_atomic_fetch_andnot_release > > arch_atomic_fetch_dec > > arch_atomic_fetch_dec_acquire > > arch_atomic_fetch_dec_release > > arch_atomic_fetch_inc > > arch_atomic_fetch_inc_acquire > > arch_atomic_fetch_inc_release > > arch_atomic_inc_return > > arch_atomic_inc_return_acquire > > arch_atomic_inc_return_release > > arch_atomic_try_cmpxchg > > arch_atomic_try_cmpxchg_acquire > > arch_atomic_try_cmpxchg_release > > > > These duplicates are presumably to handle different architectures > > generating hand-coded definitions for different subsets of the atomic > > operations. However, generating duplicate kernel-doc headers is > > undesirable. > > > > Therefore, generate only the first kernel-doc definition in a group > > of duplicates. A comment indicates the name of the function and the > > fallback script that generated it. > > So my canonical solution to fixing kernel-doc related problems is this > trivial regex: > > s/\/\*\*/\/\*/ > > works every time. Can't say that I am a fan of that approach. > And is *much* simpler than this: > > > scripts/atomic/chkdup.sh | 27 ++ > > scripts/atomic/fallbacks/acquire | 3 + > > scripts/atomic/fallbacks/add_negative | 5 + > > scripts/atomic/fallbacks/add_unless | 5 + > > scripts/atomic/fallbacks/andnot | 5 + > > scripts/atomic/fallbacks/dec | 5 + > > scripts/atomic/fallbacks/dec_and_test | 5 + > > scripts/atomic/fallbacks/dec_if_positive | 5 + > > scripts/atomic/fallbacks/dec_unless_positive | 5 + > > scripts/atomic/fallbacks/fence | 3 + > > scripts/atomic/fallbacks/fetch_add_unless | 5 + > > scripts/atomic/fallbacks/inc | 5 + > > scripts/atomic/fallbacks/inc_and_test | 5 + > > scripts/atomic/fallbacks/inc_not_zero | 5 + > > scripts/atomic/fallbacks/inc_unless_negative | 5 + > > scripts/atomic/fallbacks/read_acquire | 5 + > > scripts/atomic/fallbacks/release | 3 + > > scripts/atomic/fallbacks/set_release | 5 + > > scripts/atomic/fallbacks/sub_and_test | 5 + > > scripts/atomic/fallbacks/try_cmpxchg | 5 + > > scripts/atomic/gen-atomics.sh | 4 + This is not a huge addition, now is it? Thanx, Paul