From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 51D93A3168
	for <public@inbox.dpdk.org>; Wed, 16 Oct 2019 10:09:02 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id DDFAA1E901;
	Wed, 16 Oct 2019 10:09:00 +0200 (CEST)
Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com
 [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 065131E8FF
 for <dev@dpdk.org>; Wed, 16 Oct 2019 10:08:58 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1571213338;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=8NGQ0tZADhCy2ZDFqQlja3g0keK4WsEfwG/9tLw8pqI=;
 b=WR4PMGhGfH/E4RXt/SVClvIU+gsG6pKtxMz6SEdbyUSsy6AA0kRlc7Ma6BYiOcqkSMvUEn
 u84y8nhxnxOf+9eLspydH2lmdLGjlsgAXMjCMcrKsbfgZ5h83GmTxmX0bu42A7SxEE71tV
 6i9YZU0jn2ktqBzhTj47CmIt1EIAK9Y=
Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com
 [209.85.222.69]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-359-elbnoduTOC-uYfxMwKf-_w-1; Wed, 16 Oct 2019 04:08:57 -0400
Received: by mail-ua1-f69.google.com with SMTP id m45so5117953uae.18
 for <dev@dpdk.org>; Wed, 16 Oct 2019 01:08:57 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=WC9GVmbpmb9ZobY9UcZ1L5ppL/eTycF4hsImtE2K05g=;
 b=gQBGLA++WsA3SeJ1pQvfl8+suBRoFiJ8ejlJWm3q5DyjuhdJ/ZfU+0KxK/abZGNoFY
 vA8KcRLMouvmRcD8AA3m82w7TlCiH2Ei8lHr2Ay6JVF6S8my2WfMRavpVZXtu94tfGDx
 Pp9ZPw2u/V1LlOlhgJIYvZATjNGlPKHCQToSOsR97eQmoiLOlwi8VwfKC1zWN9lebhQd
 TqEBD8gjXJjuHkW0o1wDbHKNqmm1Cntog4y9tSk91F32HB//H2BPsFnUXHi/56zscUBm
 SQJLgD1ezLPWbioyyaM4uH8uqP/LxdWtqyuSSwrsmvdnTY3CullbDcMI8axxUreaDqu4
 +pow==
X-Gm-Message-State: APjAAAW7oqwD494xnhLsxPPIzAUBgSUvdS8tczbzBpefuEwK72l8+YQ2
 XFbh+DUFMeCa+PwZQA1rIUkTb8I9aiFlyhMque25IJqOgre8YYQd38svO47PJY/s9GfwhiKmaHk
 PmiZJHyD7tnj8ubAPOtg=
X-Received: by 2002:ab0:7107:: with SMTP id x7mr17388057uan.87.1571213336639; 
 Wed, 16 Oct 2019 01:08:56 -0700 (PDT)
X-Google-Smtp-Source: APXvYqzmKKsz2ZDEVlDw4IrONWpURvyeSF1w0qtl7bjYSM14BvcEz51z4M5f5a3x6Gnlf5HA/nQXDPrKRDaFPMRhF10=
X-Received: by 2002:ab0:7107:: with SMTP id x7mr17388048uan.87.1571213336268; 
 Wed, 16 Oct 2019 01:08:56 -0700 (PDT)
MIME-Version: 1.0
References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com>
 <1566454356-37277-1-git-send-email-gavin.hu@arm.com>
In-Reply-To: <1566454356-37277-1-git-send-email-gavin.hu@arm.com>
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 16 Oct 2019 10:08:44 +0200
Message-ID: <CAJFAV8xV+=+wntcH7AKh3tEa8CvAUYjCun0KbSfBmbZhrHvNSg@mail.gmail.com>
To: Bruce Richardson <bruce.richardson@intel.com>, 
 "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
 David Christensen <drc@linux.vnet.ibm.com>
Cc: dev <dev@dpdk.org>, Gavin Hu <gavin.hu@arm.com>, nd <nd@arm.com>, 
 Thomas Monjalon <thomas@monjalon.net>,
 Stephen Hemminger <stephen@networkplumber.org>, 
 Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
 Pavan Nikhilesh <pbhagavatula@marvell.com>, 
 Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
X-MC-Unique: elbnoduTOC-uYfxMwKf-_w-1
X-Mimecast-Spam-Score: 0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [dpdk-dev] [PATCH v4 0/6] use WFE for locks and ring on aarch64
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

Hello guys,

This series got a lot of attention from ARM people and it seems ready
for integration.
But I did not see comment from other architectures, could you have a
look please?


Thanks.
--=20
David Marchand


On Thu, Aug 22, 2019 at 8:13 AM Gavin Hu <gavin.hu@arm.com> wrote:
>
> DPDK has multiple use cases where the core repeatedly polls a location in
> memory. This polling results in many cache and memory transactions.
>
> Arm architecture provides WFE (Wait For Event) instruction, which allows
> the cpu core to enter a low power state until woken up by the update to t=
he
> memory location being polled. Thus reducing the cache and memory
> transactions.
>
> x86 has the PAUSE hint instruction to reduce such overhead.
>
> The rte_wait_until_equal_xxx APIs abstract the functionality of 'polling
> for a memory location to become equal to a given value'.
>
> For non-Arm platforms, these APIs are just wrappers around do-while loop
> with rte_pause, so there are no performance differences.
>
> For Arm platforms, use of WFE can be configured using CONFIG_RTE_USE_WFE
> option. It is disabled by default.
>
> Currently, use of WFE is supported only for aarch64 platforms. armv7
> platforms do support the WFE instruction, but they require explicit wake =
up
> events(sev) and are less performannt.
>
> Testing shows that, performance varies across different platforms, with
> some showing degradation.
>
> CONFIG_RTE_ARM_USE_WFE should be enabled depending on the performance
> benchmarking on the target platforms. Power saving should be an bonus,
> but currenly we don't have ways to characterize that.
>
> V4:
> - rename the config as CONFIG_RTE_ARM_USE_WFE to indicate it applys to ar=
m only
> - introduce a macro for assembly Skelton to reduce the duplication of cod=
e
> - add one patch for nxp fslmc to address a compiling error
> V3:
> - Convert RFCs to patches
> V2:
> - Use inline functions instead of marcos
> - Add load and compare in the beginning of the APIs
> - Fix some style errors in asm inline
> V1:
> - Add the new APIs and use it for ring and locks
>
> Gavin Hu (6):
>   bus/fslmc: fix the conflicting dmb function
>   eal: add the APIs to wait until equal
>   ticketlock: use new API to reduce contention on aarch64
>   ring: use wfe to wait for ring tail update on aarch64
>   spinlock: use wfe to reduce contention on aarch64
>   config: add WFE config entry for aarch64
>
>  config/arm/meson.build                             |  1 +
>  config/common_base                                 |  6 +++++
>  drivers/bus/fslmc/mc/fsl_mc_sys.h                  | 10 +++++---
>  drivers/bus/fslmc/mc/mc_sys.c                      |  3 +--
>  .../common/include/arch/arm/rte_pause_64.h         | 30 ++++++++++++++++=
++++++
>  .../common/include/arch/arm/rte_spinlock.h         | 25 ++++++++++++++++=
++
>  lib/librte_eal/common/include/generic/rte_pause.h  | 26 ++++++++++++++++=
++-
>  .../common/include/generic/rte_ticketlock.h        |  3 +--
>  lib/librte_ring/rte_ring_c11_mem.h                 |  4 +--
>  lib/librte_ring/rte_ring_generic.h                 |  3 +--
>  10 files changed, 99 insertions(+), 12 deletions(-)
>
> --
> 2.7.4
>