From patchwork Wed Apr 22 03:30:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 185653 Delivered-To: patch@linaro.org Received: by 2002:a92:3d9a:0:0:0:0:0 with SMTP id k26csp251993ilf; Tue, 21 Apr 2020 20:30:53 -0700 (PDT) X-Google-Smtp-Source: APiQypKyp9wju5PAM4bX/HxxI7gbTieh3x/2nP34lda+vROTh1ZUQv6ElAkL99ZhAfin2iebCLSQ X-Received: by 2002:a17:906:11c9:: with SMTP id o9mr24893961eja.64.1587526253691; Tue, 21 Apr 2020 20:30:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587526253; cv=none; d=google.com; s=arc-20160816; b=baaAi9I/cf8tn8Wh5PVsVMspXJqclv1OdWjDcQwWpNU8B+ChyDzLEJ2TKqXZdQItq3 c8/jPeymeoR3/4uwo9HIQ43+wJvOWFlKmjl+kkmoVzuqouilrWZ4ASwXNhxytxV7GNuY FQhxAnGqsrZcgzhP4Y6XpoMxD7nsTuwVf0uqD7DS7weepkLCUmFBLULK4NzH4Sl8U8qK 8+wHDmYBlok6/uenKOaBnfgH/QMIMDrYyRXFdUHrYAerR3m3tL0zWtgsJOUHA5EpC8Zx tfAsGwJ+y3f6bXL68t6RRcxlFwx8MYnPomxO+pX/O0JLR+oLmitVaTFy/gKeRVcsjHDj Bq5w== 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=mDRz4aUz6639xLrp/zZDvVhLTX5R3OsgL7wbE1gXZK0=; b=IBfXKz5jpVN868l3iL69CFncP/bqlPRp2hw/rY2WQ1flytahtK5o+FL0Sq4c3PJ/HW gq3Z7EaKg7QR8hCLmvHcF8i0O8g6ZbRUqkcaVZLe4ZFBvdXbjATMz6auDWe+0NpRQrSn 1moDZhA7+S4ldM+RJ0oYvO6h4lUF2Gap2l0h/FyRtvdde94MLOjcMCSQoMUMEtPxJECt 0sbSt58EsmYsoLM2s49C087MDr3KhrenfT9cMLLI5uKrsw1yox7N1YmYl7s9U6iBKy7N nDSIukyptNmm1OwPcIC5YM3TobWZpv9P+BJ7jBDSIHL7dh7g5yqTLOkzj6S/hY5no25c h4BA== 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 e16si2654086ejk.0.2020.04.21.20.30.53; Tue, 21 Apr 2020 20:30:53 -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 B10201C434; Wed, 22 Apr 2020 05:30:39 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 27D1D1C2DD for ; Wed, 22 Apr 2020 05:30:36 +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 721BE1063; Tue, 21 Apr 2020 20:30:35 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.14.48]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 611913F6CF; Tue, 21 Apr 2020 20:30:35 -0700 (PDT) From: Honnappa Nagarahalli To: konstantin.ananyev@intel.com, stephen@networkplumber.org, vladimir.medvedkin@intel.com, dev@dpdk.org Cc: honnappa.nagarahalli@arm.com, david.marchand@redhat.com, ruifeng.wang@arm.com, dharmik.thakkar@arm.com, nd@arm.com Date: Tue, 21 Apr 2020 22:30:06 -0500 Message-Id: <20200422033006.1124-5-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200422033006.1124-1-honnappa.nagarahalli@arm.com> References: <20191001062917.35578-1-honnappa.nagarahalli@arm.com> <20200422033006.1124-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v5 4/4] lib/rcu: add additional debug logs 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" Added additional debug logs. These helped in debugging RCU defer APIs. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Gavin Hu Reviewed-by: Ruifeng Wang --- lib/librte_rcu/rte_rcu_qsbr.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.17.1 Acked-by: Konstantin Ananyev diff --git a/lib/librte_rcu/rte_rcu_qsbr.h b/lib/librte_rcu/rte_rcu_qsbr.h index e2fc7f83e..9524915fa 100644 --- a/lib/librte_rcu/rte_rcu_qsbr.h +++ b/lib/librte_rcu/rte_rcu_qsbr.h @@ -718,8 +718,15 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait) RTE_ASSERT(v != NULL); /* Check if all the readers have already acknowledged this token */ - if (likely(t <= v->acked_token)) + if (likely(t <= v->acked_token)) { + __RTE_RCU_DP_LOG(DEBUG, + "%s: check: token = %"PRIu64", wait = %d", + __func__, t, wait); + __RTE_RCU_DP_LOG(DEBUG, + "%s: status: least acked token = %"PRIu64"", + __func__, v->acked_token); return 1; + } if (likely(v->num_threads == v->max_threads)) return __rte_rcu_qsbr_check_all(v, t, wait);