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 A1286429AF; Fri, 21 Apr 2023 23:27:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32372410FB; Fri, 21 Apr 2023 23:27:11 +0200 (CEST) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id AC5FB406B3 for ; Fri, 21 Apr 2023 23:27:09 +0200 (CEST) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-63b4e5fdb1eso3289038b3a.1 for ; Fri, 21 Apr 2023 14:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1682112429; x=1684704429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=F4ee7a4gG7Opcy0K+vJHEb7GGH4KpPlIRBVJnX0EaUY=; b=KmyiYb4uQKR9nPtTOPeGXaz3mDkyxsXIk3d7w9IJU5JvJsSGK4wmdo452EoeQ9qRPf lNBl/KbQnPMYSVSI8fqOHL+tR8YJ6cMQvy7mC2KYOYmNhTb+SUJvxLx88PjVaIDQPR3h fc4ddDKCJWf5w27yMb4gbGrfP+Cn9IVqr0OYeTiHcWe1xDK6R8BxCtwJ7E8pxdUCUgsT DpWeTTTNhBIeCjjrmvX/qxpuUYCKZXEm2qcki5NNL0CbCPIm0dUKU7wqF/oOYgQsE6b5 hkUosUDDgpS/aRHm42CB1RfGaIyUOUYzo48/pba98rlg1LT9+17gDp5rpEZTZwn6rM+y Gwww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682112429; x=1684704429; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=F4ee7a4gG7Opcy0K+vJHEb7GGH4KpPlIRBVJnX0EaUY=; b=eqoBy/BGH5AYSGkqufoKmHJcxa72fhNt/KOecO+z9jAd3n4jfO1y9jHhwy4R0Cp6Xv SJhUK/A3Tb9VPEqKeaSmcVHv+8IroqoNIbYVR4ZOV4Rjn+6Jlhb/OsJchvOK61jwz/mm Ui5M8TuC1YPZliHLg+ZyXMDMcXftNvlYe7Kc4/PKFfWM9bqvVRIUpt3IcpJCpgD2AJWB wNOCiT1ZcfV2o5lfnYK7ZB6sBvKlbEs2iDvRPIxzP4jlE/tZKwnwv6B/1gPZYS4gCxWh YoCDWPKINC4V2Q9B5MNbZfMIZZnz8jTzXNIfJsainGTid82uS2UrNlRw35vKGRHMM32J br4g== X-Gm-Message-State: AAQBX9dzlXUlLj0+AzuQC5tYB8n/D58GLb0FQIrdJNccIpCeZKTO1bgc 2xQPGkkJ1JJVOwsJCSlbUBXJ/g== X-Google-Smtp-Source: AKy350ZHIh/Q2bgq/4sPBejXFD6pgh+drBLmEcTV+SmEpZjkaEdPbBdBivVCl6qpCQlLCsNkiPUwfg== X-Received: by 2002:aa7:88d1:0:b0:63b:89a9:529f with SMTP id k17-20020aa788d1000000b0063b89a9529fmr8020171pff.14.1682112428870; Fri, 21 Apr 2023 14:27:08 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id o8-20020a056a0015c800b0062dd8809d6esm3392084pfu.150.2023.04.21.14.27.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Apr 2023 14:27:08 -0700 (PDT) Date: Fri, 21 Apr 2023 14:27:06 -0700 From: Stephen Hemminger To: Wathsala Vithanage Cc: honnappa.nagarahalli@arm.com, konstantin.v.ananyev@yandex.ru, feifei.wang2@arm.com, dev@dpdk.org, nd@arm.com Subject: Re: [RFC] ring: improve ring performance with C11 atomics Message-ID: <20230421142706.55f3d928@hermes.local> In-Reply-To: <20230421191446.216958-1-wathsala.vithanage@arm.com> References: <20230421191446.216958-1-wathsala.vithanage@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 21 Apr 2023 19:14:46 +0000 Wathsala Vithanage wrote: > /* Ensure the head is read before tail */ > __atomic_thread_fence(__ATOMIC_ACQUIRE); > > - /* load-acquire synchronize with store-release of ht->tail > - * in update_tail. > - */ This makes sense since tail is already synchronized by the previous thread fence. Probably best to add the comment about ht->tail into the existing thread_fence comment. Something like: /* Ensure that head is read before tail and that tail synchronized with update_tail */