Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1690624rwd; Thu, 18 May 2023 16:07:47 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6d/3sjNJADtKT5MrVvtRdALfcUOqNFHJ7VjXG53pdo/MFrPEDIzEktB6u/Zf3YkSjA+m5Y X-Received: by 2002:a05:6a20:8f10:b0:100:a785:4a86 with SMTP id b16-20020a056a208f1000b00100a7854a86mr53044pzk.7.1684451267060; Thu, 18 May 2023 16:07:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684451267; cv=none; d=google.com; s=arc-20160816; b=QQ/Ig6OYvUggNsKQZjDETzDXD9ZPEZlG5vgXfWkV+9kRAsioRBQaDqohmwsdX7IdUW Po75HcnG4X1bas+mMkMtbU23p5Y3Fg7+BlM4gm/HJIFT363SQjFVrPVo3H+xh4X1XyZS VCVRLbvvaovjBwqplsVSkMEDFx8HbU+DGoepWOpzxSzQqli1sB4ULZa8dUsk7mJ6GKmc YxvhjaqPLFtok/zlnaPUB/HjcHMoSLkGchl4zhEqc/5jy3FOZVrZ02aek9FtyHjz/3EL Hf74d1+sdb9/LSlhbXnsloJkJxjRJVAakM/fJQVgFrSrZzUzydRqRwHhaph50jY4BuHQ ur0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=5CZ/ahp6QbzIwrHeRcNr1YUJFcFXDR5dAmZrwm//MxA=; b=Xwj0kX+1S7ZoWs6fVgL5Sbs8MZsHcYu2JOlERaU5HeRBGpJrrCyQDe+lDpToxB5uQA TgxARegxChZ9s9jwdte2BmzCUGEUepN66DYDKp9LjQhQcz2+Ypg517HEFxBFjM+XNAjh uxkItCat2NS6E70VF/Jdb/HOoWNw6pdaOHR9Z9WYhLpf2eypVJyLg/t30N+T7xZ6St4g WiN38lnpScWgRllC65ix17+UNV7LaQH+oR2iCx9Oz7/ijx9183UlhoMDH53Lr4lxDj6A IQnc9xwu1MJjK7WTRUfGHCs+lYz1FsNSCDykoV+yeN4XXQaFfe7iPw4g8DR9T3HLfWY/ yZNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucL2a7Mg; 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 x13-20020a656aad000000b0051f00f55bd8si2432362pgu.224.2023.05.18.16.07.33; Thu, 18 May 2023 16:07:47 -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=ucL2a7Mg; 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 S230525AbjERWk2 (ORCPT + 99 others); Thu, 18 May 2023 18:40:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbjERWkW (ORCPT ); Thu, 18 May 2023 18:40:22 -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 B5D08E6E; Thu, 18 May 2023 15:40:21 -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 96DFB65290; Thu, 18 May 2023 22:40:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8D96CC4339C; Thu, 18 May 2023 22:40:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684449621; bh=mYcPMMrN9V5gypfz26UfLD+vMchASHDokjM0vkhV+Wk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ucL2a7MgZPPqtpXsUTgCswQPPRnexmjCSgdKfPjcP9HjKQ6yaF9WpZbAaPDPjRry9 3uskc28qepqVcPcSg1/M6GwpDedvHESb98wt74Sc+YnspeuSz6Yrmxws30HPnO5JjU XeOTyqZqf7wyLLYouBMz2jaJogzjHzMsmpq86e1WDoOii2tmUpLux40hFMBQaZKbYI Yw+ze0IEjJfdpQYuqXX4HaY/DxINFLsl2Xn7PC18tHnClFpWIvbj2voBBQKBpDOMiA iV6xC4AZkXsJmSzoczNly6SzZXlp7oWaiDzHmxbOY1+I5BkiuyXXxDMTKHuRuWD8/l 0T3wu7dtCsPOQ== From: SeongJae Park To: paulmck@kernel.org Cc: SeongJae Park , joel@joelfernandes.org, corbet@lwn.net, rcu@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] Docs/RCU/rculist_nulls: Drop unnecessary '_release' in insert function Date: Thu, 18 May 2023 22:40:08 +0000 Message-Id: <20230518224008.2468-5-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230518224008.2468-1-sj@kernel.org> References: <20230518224008.2468-1-sj@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The document says we can avoid extra smp_rmb() in lockless_lookup() and extra _release() in insert function when hlist_nulls is used. However, the example code snippet for the insert function is still using the extra _release(). Drop it. Signed-off-by: SeongJae Park --- Documentation/RCU/rculist_nulls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/RCU/rculist_nulls.rst b/Documentation/RCU/rculist_nulls.rst index 5cd6f3f8810f..463270273d89 100644 --- a/Documentation/RCU/rculist_nulls.rst +++ b/Documentation/RCU/rculist_nulls.rst @@ -191,7 +191,7 @@ scan the list again without harm. obj = kmem_cache_alloc(cachep); lock_chain(); // typically a spin_lock() obj->key = key; - atomic_set_release(&obj->refcnt, 1); // key before refcnt + atomic_set(&obj->refcnt, 1); /* * insert obj in RCU way (readers might be traversing chain) */ -- 2.25.1