From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6DC13A2F6B for ; Tue, 8 Oct 2019 23:12:48 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 763131C2A2; Tue, 8 Oct 2019 23:12:47 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id B444F1C0D2; Tue, 8 Oct 2019 23:12:41 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3FEA615BE; Tue, 8 Oct 2019 14:12:41 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 300533F68E; Tue, 8 Oct 2019 14:12:41 -0700 (PDT) From: Honnappa Nagarahalli To: honnappa.nagarahalli@arm.com, david.marchand@redhat.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, ruifeng.wang@arm.com, stable@dpdk.org, nd@arm.com Date: Tue, 8 Oct 2019 16:12:16 -0500 Message-Id: <20191008211220.31586-4-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191008211220.31586-1-honnappa.nagarahalli@arm.com> References: <20191008211220.31586-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-stable] [PATCH v2 3/7] doc/rcu: add information about storing token and resource X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" After calling rte_rcu_qsbr_start API, the token and the deleted resource need to be stored for subsequent query/free. Fixes: 64994b56cfd7 ("rcu: add RCU library supporting QSBR mechanism") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Gavin Hu --- doc/guides/prog_guide/rcu_lib.rst | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/guides/prog_guide/rcu_lib.rst b/doc/guides/prog_guide/rcu_lib.rst index 4d1ed3954..8d0dfcf29 100644 --- a/doc/guides/prog_guide/rcu_lib.rst +++ b/doc/guides/prog_guide/rcu_lib.rst @@ -162,14 +162,19 @@ running as worker threads. The separation of triggering the reporting from querying the status provides the writer threads flexibility to do useful work instead of blocking for the reader threads to enter the quiescent state or go offline. This reduces the -memory accesses due to continuous polling for the status. +memory accesses due to continuous polling for the status. But, since the +resource is freed at a later time, the token and the reference to the deleted +resource need to be stored for later queries. The ``rte_rcu_qsbr_synchronize()`` API combines the functionality of ``rte_rcu_qsbr_start()`` and blocking ``rte_rcu_qsbr_check()`` into a single API. This API triggers the reader threads to report their quiescent state and polls till all the readers enter the quiescent state or go offline. This API does not allow the writer to do useful work while waiting and introduces -additional memory accesses due to continuous polling. +additional memory accesses due to continuous polling. However, the application +does not have to store the token or the reference to the deleted resource. The +resource can be freed immediately after ``rte_rcu_qsbr_synchronize()`` API +returns. The reader thread must call ``rte_rcu_qsbr_thread_offline()`` and ``rte_rcu_qsbr_thread_unregister()`` APIs to remove itself from reporting its -- 2.17.1