From patchwork Tue Oct 8 21:12:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 175578 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp6231251ill; Tue, 8 Oct 2019 14:13:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2XMrCc346f1eqiTf5zMJ+iNrxyTDhSY9feVUnru/BC74+Y+4QphRCtrAs4Iq4pCXa8xz2 X-Received: by 2002:aa7:db43:: with SMTP id n3mr67692edt.176.1570569182816; Tue, 08 Oct 2019 14:13:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570569182; cv=none; d=google.com; s=arc-20160816; b=UGwk6xTGnFeKzoaWKSEDtJNYvsCW9tnrjeVCdx3gIUeuex5NI7ZvFdHdT1TiPB1fQs EVtZu9O5K04qjQwurx102pRgtea1oZrQRl+lQKsHgpMchCMap5v5VEQ9i0XOscPsn8IX OcPa5owDQP9hg17yTtr702QPXteFYMwXbxWFUTkLvuL6FC8JcHLO8aWZxGc8GhJXdl69 DKsB1XtYNoiMI+KFTCVdClK/K91bPkFcy6Q+03s1SVoijjwwiQIwwybqqcCC+4SJLX0J nkWvfla9TD5U2nifXT54AfFHONPSBYyhK2EkzrSMe0BI1YxEJnc8ve3v2mG1IKiMOoyR QpDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=zFfpJlc1r0SNDnlZaKxy8seOd6LoByrZyTSF9iy0q54=; b=DAc5oFgN4/LImgohUKhUb/gWm4+Dt1o0nLG9Qvm6A81LUmxgehPN1atSLWucFBMTRO hBipzkN96XTmtnTWBqRY9enRxEgLWc2kOJUsvis4809OOtmllfk1s/xPFkpGTmFSxdul XcgmcMIYoWXAlCsXboHmHkGB+lyx4SqB54NppShdr60SWxK1mlxENM8CSG2egKsf4AJ5 btb7q/c6GsfbcYvZEkKEbJfhdzm0hFsys4jigeFxt9r1JgK46daZJqInDskd4QSsBIPB t/yyiVoAfAKp3AigVRWGjUiggFSORF6Se5RkkfyjAclwCDV8E7caUhlk65txUdS73tKI fJ1g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id q1si112000edj.354.2019.10.08.14.13.02; Tue, 08 Oct 2019 14:13:02 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9851F1C43E; 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-dev] [PATCH v2 3/7] doc/rcu: add information about storing token and resource X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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(-) -- 2.17.1 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