From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 29EF9C5B576 for ; Sun, 30 Jun 2019 20:30:12 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id AD4D72089C for ; Sun, 30 Jun 2019 20:30:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="tLkGT+23" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AD4D72089C Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=networkplumber.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA7F61B964; Sun, 30 Jun 2019 22:30:10 +0200 (CEST) Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by dpdk.org (Postfix) with ESMTP id A3B4C5424 for ; Sun, 30 Jun 2019 22:30:08 +0200 (CEST) Received: by mail-pl1-f194.google.com with SMTP id a93so6182510pla.7 for ; Sun, 30 Jun 2019 13:30:08 -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=vOcD4KJoFuaNJ1oYLFWZ6v1naY0gO9GSa2jiAMuLlq0=; b=tLkGT+231tfwP0hTKdWwhwH4hH2RTksfN0RssyTy4mhYKk+pT1+50M5dSykcjBk5+7 Ces4t5oO1pvHg/MGsOELIdFawwYSlLCjD464wStoyNXFdt3doSC/EPgpteZ5G5xMq+Dz hfYyZMTi0JHSGl2Mw4eiwiQE0Vl2Bvf/PpcBnkUo85oNQgx3qcwUSFCpIr4EMLV3WNLX 2+q+W1WgknqrJZVoM9sRLn/tAt9XfGqMj6Fos/p9HSZcX55GqbElTbxBcD2ILdcG4wBf y78RQBlaQNYX5c9ugzlT/VVOf6gKcgjiQsTEemDkBsuFLzQeSA4NOoIwxihBotCLr6ZG dkxg== 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=vOcD4KJoFuaNJ1oYLFWZ6v1naY0gO9GSa2jiAMuLlq0=; b=g5OvME8Xr2ciym3WedjSWYuLOCuPhcxcfkpEO6uBGQrKR66Gnbb1onzNIStUvpSnjD oYjqoTO/KsYVvPmWNSFa07cnf62qKFmivh04vrsWZHPSY4bSpk6/HWbQB0yaBibubX4O JjCeTlnljWfJlL3r1uLiLYoXbA0WufpMCiC+43AUPZGGERnMLtN0yRz1uIP1AjrIV8eW XSCt8PqPo4CGJaGcAQUyII0zzjNMxzBpc0EnGeeEOuW9tvif1UCLDU6UQF/Zi1M+Teb9 tKSCDeRmDltQzn7+k9OXexUxSyxMz6sd7+z82JRwQnocoohhXrb4E4vc/V5qh/vK2zgU RSPg== X-Gm-Message-State: APjAAAVITnTir2v+laE20V0qwZjCGxxcdyoNgM0Dbeqnd7dmnHcOMJEL G60mY6puvVzmIg4R3mVUUoIRKQ== X-Google-Smtp-Source: APXvYqwl1Za6IqFpHD5shzD8g7aoeFRiuXoUV8/WqT4F+H0FU73HyaIzrx6k8JGd0wPHe91l14LWyw== X-Received: by 2002:a17:902:f301:: with SMTP id gb1mr24349952plb.292.1561926607818; Sun, 30 Jun 2019 13:30:07 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id f88sm10382106pjg.5.2019.06.30.13.30.07 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 30 Jun 2019 13:30:07 -0700 (PDT) Date: Sun, 30 Jun 2019 13:29:58 -0700 From: Stephen Hemminger To: Gavin Hu Cc: dev@dpdk.org, thomas@monjalon.net, jerinj@marvell.com, hemant.agrawal@nxp.com, bruce.richardson@intel.com, chaozhu@linux.vnet.ibm.com, Honnappa.Nagarahalli@arm.com, nd@arm.com Message-ID: <20190630132958.6d2250da@hermes.lan> In-Reply-To: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC 0/5] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 1 Jul 2019 00:21:11 +0800 Gavin Hu 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 the > 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_USE_WFE should be enabled depending on the performance on the > target platforms. How does this work if process is preempted?