From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 695B243B86 for ; Tue, 5 Mar 2024 10:53:02 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 62A5A42DDF; Tue, 5 Mar 2024 10:53:02 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2050.outbound.protection.outlook.com [40.107.243.50]) by mails.dpdk.org (Postfix) with ESMTP id 1002642DDF for ; Tue, 5 Mar 2024 10:53:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TuGFN65RJ84PL2x+LjuoGhp20W16kVeCu4PxxH6MlOiJoRSrTS6Avck38Mzu3cCnTvjr8sZiOL65mPm6zwANG7Hb5JqnOOopJbb+5wVG4h2XNnZUgpAtL6Pa3p+jZmQZeUzhelFQOL6mbr+TzaVqXWVAXp9SplqKlNHrqRZ6C4DltuGNS9ZAKFqvD6r2bW9zZMtQDMqVMpbFm1xNmNqnYTL9pH2yH/qfNAa0rG/fOz87pBDlwYiFeT1nJrOaXcNdaxpuEfvFwkkhLnE9HWTDwobe5F8993A9r25t16Ibj7RK5Xx3YlbhbEBogLJHWEX5cMu8do7aLqtNfbCGVIQyzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=DjCkXl3wCW7fnjQsXxkxSCiMdiXgLBZ45r5cZfgU2BQ=; b=Jpu8Y5/mQA1YfsFfAM+8uP6hH3YR7PVI7XoDweR7siRTKLxRnFPOMNxx6AD4d4k/iyNzlbdtsDfKmfiZ9WxLFhAMQ1iGCOlYJ4hwvDUAOV6gYF7qx/MGFLVe2wam291Rd+T0+GgDVUF7qf4qjBGfeD5wdJH3Zf4BgrdsO8RMhH6J/PQ7lSIVDujSkOBVyOr5GAICsXhEC1RajZa+rvM3s2fpnd+sU9akpEN2x133KjEytsuemywNNx8h2NaJtNiRBuBdhYxjPFaS4KUa0rwODK6QVi2SMiiXgKrDuZxipbYSgDv3ZPNCJhLPMehY9XCCavd9Qd6QcE/D5uP5nOii2A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=arm.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=DjCkXl3wCW7fnjQsXxkxSCiMdiXgLBZ45r5cZfgU2BQ=; b=Rq/yAHpzVwFvwg5uHwzFiOjMQ7UcK25tIQMcmlRiHORIWSOHjuAzfBmIVgpbGpyHVRDSq27JjNck3Ito4CbMA5l18SQmHdrtVzlxac6c5HDJ2YptGdYtRTKCE4WqN05BlvsbFnOA2KklDyZyBWVNCZ06O20bhk4MiWBNNTP27/sTILKCs7phkqDyx+23i9BzghlodtUgf1r+EzvI/FGlLVp0p+jBFlx/bGRwN0Wqqkb2xVkoOrvC0hmlFssKtuwxO8bk1QL6xipsFOuR2z0XaflE7fOWrCh2M6hIG57eUpp+G3/Yf5okrIMf3FjjMl681OGrenCKFmlGUippT1hMCw== Received: from SA0PR11CA0075.namprd11.prod.outlook.com (2603:10b6:806:d2::20) by MN6PR12MB8516.namprd12.prod.outlook.com (2603:10b6:208:46f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7316.36; Tue, 5 Mar 2024 09:52:58 +0000 Received: from SN1PEPF0002BA4F.namprd03.prod.outlook.com (2603:10b6:806:d2:cafe::28) by SA0PR11CA0075.outlook.office365.com (2603:10b6:806:d2::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7339.39 via Frontend Transport; Tue, 5 Mar 2024 09:52:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by SN1PEPF0002BA4F.mail.protection.outlook.com (10.167.242.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.11 via Frontend Transport; Tue, 5 Mar 2024 09:52:58 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.41; Tue, 5 Mar 2024 01:52:44 -0800 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.12; Tue, 5 Mar 2024 01:52:42 -0800 From: Xueming Li To: Honnappa Nagarahalli CC: Ola Liljedahl , dpdk stable Subject: patch 'rcu: use atomic operation on acked token' has been queued to stable release 23.11.1 Date: Tue, 5 Mar 2024 17:46:33 +0800 Message-ID: <20240305094757.439387-53-xuemingl@nvidia.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240305094757.439387-1-xuemingl@nvidia.com> References: <20240305094757.439387-1-xuemingl@nvidia.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail202.nvidia.com (10.129.68.7) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4F:EE_|MN6PR12MB8516:EE_ X-MS-Office365-Filtering-Correlation-Id: 875b8276-2f0d-4bbc-2a36-08dc3cfa09d0 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zthfI7cTLcP0zmUK2b2ogPyJnbFGTF7aLS1x4UV6W/3hBNg5Nqf2gblTX65wy7E1JFtuJw62slrgD9+8XV8SxVzM6YrbDNSYAZPlrsUe5tRxA1tyjr/BgVGUVFnbXBEWSU++RujcgX4Wh+yQnQ1PTux5lZhAbCIJxDypk1siAHTN6IzLiA1vsVYeqYxbXBp/J5EpLiRLMd+fcbNuXe8KlzKZ6DH68hqVloLpVbaW2j9ISADU/kOvcdrEAk10grH3oAfbgW6r9sGVb4ygekbCQAj2iWW6QBugQUD/FramCIE1ZQMu6MMOBwbvyau7erR83eAdRkYLihY/sBbtWpHabnARyO+jxIHn4OcxNwWV+1vzqXLCAXaXx41XRwaq8Km4Z/OaEdQzrVG1/poO0UtSdUhz+L6XT+jfxrTZwCq0+JA8K2b4L/eoh461wmUIrOCvjRhJ5VF96ADuAUScOltCdg1b4ftADEqaY/JyGM8+sO+4Yp2o0mzILShSpvgPndkE4CHw1bWLdR59dcUxiPltat0iyF+UJgQ7NgOsiCBCJJm9aKRBnXHVYmzgga0OLdRsRRxH2bksKldu3WiSs4cGzyN4O1KjhEOz/vsnIpVxBex2Ys9KoC3CXd446dAegrk2OZgbiJxrrgMSPdrjUbHgSPz5vDaa+nO6sVwWQsqao60xPP1F5P8xCHfVBLB6s//j8fZFOC0HKd62tUgm9BlN4KXZfpOMCAeeAcXxJEEmp6g8bj5T1M1LM5/1wlE5YZGD X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Mar 2024 09:52:58.2645 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 875b8276-2f0d-4bbc-2a36-08dc3cfa09d0 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA4F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN6PR12MB8516 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 23.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 03/31/24. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://git.dpdk.org/dpdk-stable/log/?h=23.11-staging This queued commit can be viewed at: https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=94b20c14a64b64c09acd7887165f75b7674e46fb Thanks. Xueming Li --- >From 94b20c14a64b64c09acd7887165f75b7674e46fb Mon Sep 17 00:00:00 2001 From: Honnappa Nagarahalli Date: Mon, 5 Feb 2024 04:59:48 +0000 Subject: [PATCH] rcu: use atomic operation on acked token Cc: Xueming Li [ upstream commit 063cddfc7426989f0c7feb514aa82bd8c4274756 ] acked_token should be read using atomic operation as the the API rte_rcu_qsbr_check is advertised as multi-thread safe. Fixes: 1f90d32ce175 ("rcu: add least acknowledged token optimization") Reported-by: Ola Liljedahl Signed-off-by: Honnappa Nagarahalli Reviewed-by: Ola Liljedahl --- lib/rcu/rte_rcu_qsbr.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/rcu/rte_rcu_qsbr.h b/lib/rcu/rte_rcu_qsbr.h index 6b908e7ee0..66780b324b 100644 --- a/lib/rcu/rte_rcu_qsbr.h +++ b/lib/rcu/rte_rcu_qsbr.h @@ -667,7 +667,8 @@ 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 <= rte_atomic_load_explicit(&v->acked_token, + rte_memory_order_relaxed))) { __RTE_RCU_DP_LOG(DEBUG, "%s: check: token = %" PRIu64 ", wait = %d", __func__, t, wait); -- 2.34.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2024-03-05 17:39:32.551375152 +0800 +++ 0052-rcu-use-atomic-operation-on-acked-token.patch 2024-03-05 17:39:30.753566492 +0800 @@ -1 +1 @@ -From 063cddfc7426989f0c7feb514aa82bd8c4274756 Mon Sep 17 00:00:00 2001 +From 94b20c14a64b64c09acd7887165f75b7674e46fb Mon Sep 17 00:00:00 2001 @@ -4,0 +5,3 @@ +Cc: Xueming Li + +[ upstream commit 063cddfc7426989f0c7feb514aa82bd8c4274756 ] @@ -10 +12,0 @@ -Cc: stable@dpdk.org @@ -20 +22 @@ -index 23c9f89805..ef1621d597 100644 +index 6b908e7ee0..66780b324b 100644 @@ -23 +25 @@ -@@ -666,7 +666,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait) +@@ -667,7 +667,8 @@ rte_rcu_qsbr_check(struct rte_rcu_qsbr *v, uint64_t t, bool wait)