From patchwork Sun Sep 8 22:49:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 173350 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:ce:0:0:0:0 with SMTP id r14csp3622164ilq; Sun, 8 Sep 2019 15:50:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqzyEhIE7ENlBNCdw1foPq/1NoOv0Uur6tRMKy+cJ4g9UEfPxOXV4NIi+gmnnKaQjWUWnwEk X-Received: by 2002:adf:ec0a:: with SMTP id x10mr16825697wrn.292.1567983057649; Sun, 08 Sep 2019 15:50:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567983057; cv=none; d=google.com; s=arc-20160816; b=Vg+mMFlmRe4o0zmEJ9Sds3gjMAYKAJVhTckwmIsvOs75q/eZjMS7ZczpcojlZ4RgsQ uEk0m94Nv2N4UQ/guJuru4A9BoUscTxgQmGR7ilB+h9xNGYtcXq59wLLIzE7KFfmxCtQ WXafKmGbxdAItmOVXBpgSRXtQBcoDrinAbLYEsOXcoeg4osNznmbr4IR/UhnhxfuLePa 7FLiNB3IqgjEuI494EFZdEPHCbsNaPJ7L5r4m0P0Q8CuU6urBsaPPtQCHik/u5CJn/Jt X+CoLQ9p3iEZZtDlEG1I+aBrXfO8LWijd8ga2yJ/Q8iwTJAA6ziAGA/tlihs/btI9uOr eKjg== 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=frUvQsPwzL90+77a2AmT+QBdM2mpxY5E9MakMN7EIR1SlCN0cTXTad8ru7IwiblFN7 DZ+3WlRt280DwxyBxIu8Ih77v4/CIRHBU3BpPEuom3iVTA0QNHR3PBWtnetER9d7rxXB aQNIMjrnNRTPLlGfJ9jG+9YppOVYiOHfCfGK7dIfh/bnp/eQZuaIHrLNoL9S1GQBbg6g hu2OD3bCPcg8OZy4sqnszSr8AOtBurFDFb+hjZ6jAuRfQlM4hNgOdwq8tDI5RqN3tBcV SKNFCdRnHEPVfLVuWPtjKAnvwhRCabCPr/qCL6Lv5kmHYjD/7pQVZRzXUEhL9c0mquZI j68Q== 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 q19si11896657wrf.397.2019.09.08.15.50.57; Sun, 08 Sep 2019 15:50:57 -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 1CBE11EA02; Mon, 9 Sep 2019 00:50:46 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 5491D1E9DA; Mon, 9 Sep 2019 00:50:44 +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 A6CCC337; Sun, 8 Sep 2019 15:50:43 -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 97AD13F67D; Sun, 8 Sep 2019 15:50:43 -0700 (PDT) From: Honnappa Nagarahalli To: honnappa.nagarahalli@arm.com, konstantin.ananyev@intel.com Cc: dev@dpdk.org, stable@dpdk.org Date: Sun, 8 Sep 2019 17:49:45 -0500 Message-Id: <20190908224949.34851-4-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190908224949.34851-1-honnappa.nagarahalli@arm.com> References: <20190908224949.34851-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH 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