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 6AB87A0547; Thu, 29 Apr 2021 17:05:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47723410F1; Thu, 29 Apr 2021 17:05:48 +0200 (CEST) Received: from mail-pj1-f47.google.com (mail-pj1-f47.google.com [209.85.216.47]) by mails.dpdk.org (Postfix) with ESMTP id 04ADD406FF for ; Thu, 29 Apr 2021 17:05:47 +0200 (CEST) Received: by mail-pj1-f47.google.com with SMTP id l10-20020a17090a850ab0290155b06f6267so4941624pjn.5 for ; Thu, 29 Apr 2021 08:05:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GdT6yw9qc/c/A3SlkSlnqq99QCNbUrQF+MvsCae52xs=; b=iYefBL21Hcj9obr9Xws6eTF8Yw6m5hCRL68S0AobmqRACpMv4II8LCYOkGfXPkIOD3 f7nTd7lL5PMGOYdqrly+4b2kaRHiYCYt+urA2BzOY8vnfUTjLrMJtxJS+Dtf/EczuG0h iFzWxxK9rPpwgb9Vqq/Eezm0XLlmEQSlCHUGpxqgP6/FemL++pjGIbBskyJWd/cquckv FZLHHCavq4joOjTgiOjxaGPdKK0ukGybxe/SYD6o8MH07bS7qU/Wph1RDsIe0nN1EEhf F8UqXCt8uLo5cO1zZhbJbvd5rHDqgy9L67UKWF9CMJ4LOTvRCCSNDOKuFvzqAxb8y9Qk uwHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GdT6yw9qc/c/A3SlkSlnqq99QCNbUrQF+MvsCae52xs=; b=lWIzbaHsqgxVqrb+PjwqNb0OlU4BLhZ+CcSeMfU0HzKktwdh+atGY20DLLxPbi8fAq QrWqNuomclWZTZIGqpNtcEQOxeTJLEqQzjYOXmtapW8BqmjMYXY1fBRGWAnBH4iTUIX0 PhavMH4LSNz92yru/NpW0y/wKo0wUrKhbp1LSHjxiUjAr0XZDUPZYAkNqH5/5VAHG69X ku/yNhMPXpanOTYfSpjZJZpt9CuitIy2EuBnyv+CEPghyuPvzBv/Paq2ThAwnAmf4TbC RMCzmEUwH+YS5lDi4RvHSDHZix2Fzup1sJMiphRdRnYA0g3IxPZalpF2/SAhWjaqTPWJ N+/Q== X-Gm-Message-State: AOAM533A6LTVmygrn3Zf464yaKnPuflo7wb18Opa0swj9IDFgXX6lxT8 +2JKm8e+lQJ31QqPKTRNg6wSUA== X-Google-Smtp-Source: ABdhPJx26gkgpxfH9t6rVz7ocO9D/iGxO/jTL2Jl+MXN1Q2yme3kA6Kxo2aMo+oTFHaK8mUEafqqPQ== X-Received: by 2002:a17:902:a40e:b029:e9:7253:8198 with SMTP id p14-20020a170902a40eb02900e972538198mr26232plq.82.1619708746156; Thu, 29 Apr 2021 08:05:46 -0700 (PDT) Received: from hermes.local (76-14-218-44.or.wavecable.com. [76.14.218.44]) by smtp.gmail.com with ESMTPSA id d20sm2774182pfn.166.2021.04.29.08.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Apr 2021 08:05:45 -0700 (PDT) Date: Thu, 29 Apr 2021 08:05:42 -0700 From: Stephen Hemminger To: Ruifeng Wang Cc: Honnappa Nagarahalli , Konstantin Ananyev , "dev@dpdk.org" , "david.marchand@redhat.com" , "thomas@monjalon.net" , "jerinj@marvell.com" , nd , Gavin Hu , Steve Capper , Ola Liljedahl Message-ID: <20210429080542.11b797bb@hermes.local> In-Reply-To: References: <20200424070741.16619-1-gavin.hu@arm.com> <20210425055653.1509261-1-ruifeng.wang@arm.com> <20210425055653.1509261-3-ruifeng.wang@arm.com> <20210428101714.2e5da560@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail update on aarch64 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 Sender: "dev" On Thu, 29 Apr 2021 14:35:35 +0000 Ruifeng Wang wrote: > > -----Original Message----- > > From: Stephen Hemminger > > Sent: Thursday, April 29, 2021 1:17 AM > > To: Ruifeng Wang > > Cc: Honnappa Nagarahalli ; Konstantin > > Ananyev ; dev@dpdk.org; > > david.marchand@redhat.com; thomas@monjalon.net; jerinj@marvell.com; > > nd ; Gavin Hu ; Steve Capper > > ; Ola Liljedahl > > Subject: Re: [dpdk-dev] [PATCH v3 2/2] ring: use wfe to wait for ring tail > > update on aarch64 > > > > On Sun, 25 Apr 2021 05:56:53 +0000 > > Ruifeng Wang wrote: > > > > > Instead of polling for tail to be updated, use wfe instruction. > > > > > > Signed-off-by: Gavin Hu > > > Signed-off-by: Ruifeng Wang > > > Reviewed-by: Steve Capper > > > Reviewed-by: Ola Liljedahl > > > Reviewed-by: Honnappa Nagarahalli > > > Acked-by: Konstantin Ananyev > > > > Looks ok to me, but it does raise an interesting question. > > Shouldn't the original code have been using atomic load to look at ht->tail. > > > > This another place where "volatile considered harmful" applies. > > Do you mean 'volatile' should be removed from rte_wait_until_equal_xxx parameters? > I meant that all access to tail should be via C11 atomic builtin. At that point, the volatile on the data structure elements does not matter.