From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id rF2QDDKPiGTXCQMAWB0awg (envelope-from ) for ; Tue, 13 Jun 2023 11:45:54 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=lists.lttng.org header.i=@lists.lttng.org header.a=rsa-sha256 header.s=default header.b=HsFPvZvQ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 25D7B1E0BB; Tue, 13 Jun 2023 11:45:54 -0400 (EDT) Received: from lists.lttng.org (lists.lttng.org [167.114.26.123]) (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 simark.ca (Postfix) with ESMTPS id A14161E0AC for ; Tue, 13 Jun 2023 11:45:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lists.lttng.org; s=default; t=1686671151; bh=SwyP9RtDGTMpDUzCnqvlzWP5hpKmkzNjSgRtalFIhVU=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=HsFPvZvQudCEtRduxwAGLjc3fUIFePuRSdFn3SpA3upoaL2fF0k6D6kM2J/0v6NAG XTi/MKOizPR5oqeAOA+MTN1vxPV5zp7gXk2mC5GvCej6jtU1XTsxG4OTtG9w1CiLn+ 0QtManSEI8WCMbN3cjs+M3S5mE5ni29Qp15uJFfJi0us7onL5JFIjO+S7fBJtuIOdt Q4OGt2Txl72jiPxGsXu6SSne3dUzKPSkJUsaw6gn51YwqXT98h/xn5sSTvGJfbjSZZ mFnoefo3ZUZmXZeSI4qltNRVL6VAQhzPZy0jqyCA7JTomWQ3hP/1DvcyrP/RpFShsE aVPvKA5pF9aHw== Received: from lists-lttng01.efficios.com (localhost [IPv6:::1]) by lists.lttng.org (Postfix) with ESMTP id 4QgXvf6Lqpz1gLx; Tue, 13 Jun 2023 11:45:50 -0400 (EDT) Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lists.lttng.org (Postfix) with ESMTPS id 4QgXvd6qC7z1gLw for ; Tue, 13 Jun 2023 11:45:44 -0400 (EDT) Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-662b85f4640so4732414b3a.0 for ; Tue, 13 Jun 2023 08:45:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686671143; x=1689263143; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Ki14TB10SKX139FaSaE6XkR4DBu8UltYOccjvXinh4s=; b=SfnP2aot9nMqux8KBzFD6+7EHriReG/q0xmw0+mVX2cNH3IS061cKB4dlwkKeObdFs WRzd0PUXLz16joIGGWChjJwGs0Ex5FPJE+ldbx7UKHDlfVVUL8CN9pukPX/ReNqtyNeS K1qq9WYrO6M3VTXiz7PJqJE62CgvsppV11Y6tWbr/7ICTCwIIRFFMC2KkzgH1J8iQF3J l31aq5Wuc+Y5JnozOhc3mee5M0jnMhc98ARBk04XPCJe9HQFFXvbtS1cPOiobPaUwEBW r8XpTCfA2opTsAkQPBfVn46jvzFU/iUoFeuDcZ41QM4isiXt5LXNQ+ma+v8IEcEI+MyI 43Nw== X-Gm-Message-State: AC+VfDyFUgDXK6bFg6OOaA0VX3OUNZIDdpHh0urF9PXUzajVrRopWBPc vDl8xvWjQfIajVt24EDGpoU3199VaQ== X-Google-Smtp-Source: ACHHUZ6yC7BDIhZS2p++AVkXTwNlNGE4pAvHKMzpL4493qD3oREqwXsQHLNHl3mGgkha7bUfFYPshQ== X-Received: by 2002:a05:6a21:99a5:b0:10c:62b3:7dc4 with SMTP id ve37-20020a056a2199a500b0010c62b37dc4mr13550856pzb.55.1686671143114; Tue, 13 Jun 2023 08:45:43 -0700 (PDT) Received: from korin-ASUS-TUF-Gaming-F15-FX507ZM-FX507ZM.. ([140.116.136.92]) by smtp.gmail.com with ESMTPSA id t1-20020aa79381000000b0064381853bfcsm8804775pfe.89.2023.06.13.08.45.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 08:45:42 -0700 (PDT) To: lttng-dev@lists.lttng.org Date: Tue, 13 Jun 2023 23:45:23 +0800 Message-Id: <20230613154523.17184-1-k777k777tw@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [lttng-dev] [PATCH] Fix: revise urcu_read_lock_update() comment X-BeenThere: lttng-dev@lists.lttng.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: LTTng development list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Li-Kuan Ou via lttng-dev Reply-To: Li-Kuan Ou Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: lttng-dev-bounces@lists.lttng.org Sender: "lttng-dev" Read-side critical section nesting is tracked in lower-order bits and grace-period phase number use a single high-order bit Signed-off-by: Li-Kuan Ou --- include/urcu/static/urcu-bp.h | 4 ++-- include/urcu/static/urcu-mb.h | 4 ++-- include/urcu/static/urcu-memb.h | 4 ++-- include/urcu/static/urcu-signal.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/urcu/static/urcu-bp.h b/include/urcu/static/urcu-bp.h index 8ba3830..c90c9f1 100644 --- a/include/urcu/static/urcu-bp.h +++ b/include/urcu/static/urcu-bp.h @@ -137,8 +137,8 @@ static inline enum urcu_bp_state urcu_bp_reader_state(unsigned long *ctr) /* * Helper for _urcu_bp_read_lock(). The format of urcu_bp_gp.ctr (as well as - * the per-thread rcu_reader.ctr) has the upper bits containing a count of - * _urcu_bp_read_lock() nesting, and a lower-order bit that contains either zero + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of + * _urcu_bp_read_lock() nesting, and a single high-order bit that contains either zero * or URCU_BP_GP_CTR_PHASE. The smp_mb_slave() ensures that the accesses in * _urcu_bp_read_lock() happen before the subsequent read-side critical section. */ diff --git a/include/urcu/static/urcu-mb.h b/include/urcu/static/urcu-mb.h index b97e42a..218e2f3 100644 --- a/include/urcu/static/urcu-mb.h +++ b/include/urcu/static/urcu-mb.h @@ -63,8 +63,8 @@ extern DECLARE_URCU_TLS(struct urcu_reader, urcu_mb_reader); /* * Helper for _urcu_mb_read_lock(). The format of urcu_mb_gp.ctr (as well as - * the per-thread rcu_reader.ctr) has the upper bits containing a count of - * _urcu_mb_read_lock() nesting, and a lower-order bit that contains either zero + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of + * _urcu_mb_read_lock() nesting, and a single high-order bit that contains either zero * or URCU_GP_CTR_PHASE. The cmm_smp_mb() ensures that the accesses in * _urcu_mb_read_lock() happen before the subsequent read-side critical section. */ diff --git a/include/urcu/static/urcu-memb.h b/include/urcu/static/urcu-memb.h index c8d102f..b923f73 100644 --- a/include/urcu/static/urcu-memb.h +++ b/include/urcu/static/urcu-memb.h @@ -86,8 +86,8 @@ extern DECLARE_URCU_TLS(struct urcu_reader, urcu_memb_reader); /* * Helper for _rcu_read_lock(). The format of urcu_memb_gp.ctr (as well as - * the per-thread rcu_reader.ctr) has the upper bits containing a count of - * _rcu_read_lock() nesting, and a lower-order bit that contains either zero + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of + * _rcu_read_lock() nesting, and a single high-order bit that contains either zero * or URCU_GP_CTR_PHASE. The smp_mb_slave() ensures that the accesses in * _rcu_read_lock() happen before the subsequent read-side critical section. */ diff --git a/include/urcu/static/urcu-signal.h b/include/urcu/static/urcu-signal.h index c7577d3..00588b8 100644 --- a/include/urcu/static/urcu-signal.h +++ b/include/urcu/static/urcu-signal.h @@ -64,8 +64,8 @@ extern DECLARE_URCU_TLS(struct urcu_reader, urcu_signal_reader); /* * Helper for _rcu_read_lock(). The format of urcu_signal_gp.ctr (as well as - * the per-thread rcu_reader.ctr) has the upper bits containing a count of - * _rcu_read_lock() nesting, and a lower-order bit that contains either zero + * the per-thread rcu_reader.ctr) has the lower-order bits containing a count of + * _rcu_read_lock() nesting, and a single high-order bit that contains either zero * or URCU_GP_CTR_PHASE. The cmm_barrier() ensures that the accesses in * _rcu_read_lock() happen before the subsequent read-side critical section. */ -- 2.34.1 _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev