Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3412341rwd; Fri, 16 Jun 2023 17:39:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6x5zqzDoPBXdfBkcL2h+m5W57/5qy8VTr7CFfBLyRO0waWfkFiH5RfkximZD+Qvzof0/1V X-Received: by 2002:a0d:e8c6:0:b0:56c:e3d7:b23f with SMTP id r189-20020a0de8c6000000b0056ce3d7b23fmr3603347ywe.40.1686962360173; Fri, 16 Jun 2023 17:39:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686962360; cv=none; d=google.com; s=arc-20160816; b=I8iTL0/oBrU4OKjxSfg/f3U1JnHAGc0KbzIzxbWxKUZApz9NmBfQWLYbLmLScs5Isx q/wMOZyTEkAiMG26Jl3R59CUOzRiJceEo32ZN7kpyCt95egmA+FJQht/bAUoYe3py2rK 7c2M5fK6Z6ctFY/VjdBNPZlM/N0M903aeqqhN7RKVUpJU7ufoiPRRMM3gS7M3L1nh/vH kGGeAabeRezuFaWPdIE0vSWelslF6K4ZM69zoEZBv6RcH10ZDdZQEOqlOqizQn5a+RTJ N/B15AOey6oU1LdekgiQJuFRT/Ut0Z6cYYvViDH0C1t7oQDYp5ELCWW4L1Gt1hvLj9TR lG7Q== 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=1dnD52chPAFDrMTq0C8Ue0v+1slOlxsehx2YZRuzJE8=; b=z9ur8CF8OJSvskrhEYGZS9lrdz+d0/eXganE9dPX0t3eE5gJSGIW86+4S3Y8JxjKcz pNo56HjtGT7jaTINguovTQOpTx/cff9slJRb7ip+7wcoyzrbPGX7MP+xt8OuXHxvDviG jmPgTzk8pOlJIbWVkP8SD7SSvwaJ91U/c+h7Sx2SgXbHs7wg57v88xMJWgISjPWFAQAh K1Mzcs8oiP1w4Ah3gDF+pcP9kkIwDXqD2Kn4XPK2JjGeq5pGonqCT2q9a+Xh8oNR/V32 S1/Fdi92mFifhLoyPCSptbxeEg5zWemRQfptw/kEjxTgPhB/0toP/wVfAeeYy12Kbtuc lB5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CVdz3loJ; 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 r9-20020a170902c60900b001b533facaa6si1852378plr.313.2023.06.16.17.39.08; Fri, 16 Jun 2023 17:39:20 -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=CVdz3loJ; 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 S1345951AbjFPXgr (ORCPT + 99 others); Fri, 16 Jun 2023 19:36:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345821AbjFPXgj (ORCPT ); Fri, 16 Jun 2023 19:36:39 -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 129B53599; Fri, 16 Jun 2023 16:36:35 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9C6EF62EF0; Fri, 16 Jun 2023 23:36:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FEB0C433D9; Fri, 16 Jun 2023 23:36:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686958594; bh=zT5gbB7rVoap1E8WJihukUSBZgfptu3BhHsTT2AdGt4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CVdz3loJKxKxjdEMlRpBM4tKvO2y4Jrovl353vdDDH2FFxpc98MD95I/mEwiT4ob2 8wZZX+QOiS3TLDzQbAAXJqtP541njXoNd8k68OJmrjPXZEkWbV2AVsOA275Fkv+jbC Nu0CkrUx949fmWRdKZA/wrp5lVh6pEzrUFt0u6LChu1Rpxdn0pPkx5m7hxVGEYm7bK 0t1lAeWBRhZUomwU7zVRICIyyjyXXcOBdJ0H6fpjbv3BTHD8wN1/QW4l47DA66Oved vC1Y0VRlM3B5inFxlLn1/QjPRpS68s1ZPO10+fDXtibFlvvppIt8xZAWN3B9Qb2FSC if1YnUwwzSd7A== From: SeongJae Park To: paulmck@kernel.org Cc: SeongJae Park , joel@joelfernandes.org, mmpgouride@gmail.com, corbet@lwn.net, rcu@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 3/3] Docs/RCU/rculist_nulls: Fix text about atomic_set_release() Date: Fri, 16 Jun 2023 23:36:26 +0000 Message-Id: <20230616233626.83906-4-sj@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230616233626.83906-1-sj@kernel.org> References: <20230616233626.83906-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 _release() in insert function when hlist_nulls is used, but that's not true[1]. Drop it. [1] https://lore.kernel.org/rcu/46440869-644a-4982-b790-b71b43976c66@paulmck-laptop/ Signed-off-by: SeongJae Park --- Documentation/RCU/rculist_nulls.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/RCU/rculist_nulls.rst b/Documentation/RCU/rculist_nulls.rst index 4afa11f2c906..660cc3f0f1e5 100644 --- a/Documentation/RCU/rculist_nulls.rst +++ b/Documentation/RCU/rculist_nulls.rst @@ -138,8 +138,7 @@ very very fast (before the end of RCU grace period) Avoiding extra smp_rmb() ======================== -With hlist_nulls we can avoid extra smp_rmb() in lockless_lookup() -and extra _release() in insert function. +With hlist_nulls we can avoid extra smp_rmb() in lockless_lookup(). For example, if we choose to store the slot number as the 'nulls' end-of-list marker for each slot of the hash table, we can detect @@ -194,6 +193,9 @@ Note that using hlist_nulls means the type of 'obj_node' field of 2) Insert algorithm ------------------- +Same to the above one, but uses hlist_nulls_add_head_rcu() instead of +hlist_add_head_rcu(). + :: /* -- 2.25.1