From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DCBA8A0613 for ; Thu, 26 Sep 2019 15:41:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id ACE254C99; Thu, 26 Sep 2019 15:41:24 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id B90734C90 for ; Thu, 26 Sep 2019 15:41:22 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id c6so6497783ioo.13 for ; Thu, 26 Sep 2019 06:41:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=TUVXnxS9UAee4IGcNrhCj60q8f8X5T3rof8oi2SOQrg=; b=rctdenP0557cFg4Of4nb71ddiiw/EhZRDMmoCZrY51dj1q8po2BIdJZbjk6NjhMfrv XcCJURAc2GGvFdkslZVHayNhIqTqcXOZJz91IessPGRhBRvaWa/eNY7t/ehC34CrVBoN 7AzwZh45KnamRNfkzEbZ9Ew/qlKCezka85simIgLRRT0Zm6V3IcuNHK2zMX//FVeafGp Udux3OguAdgs6VurYgtPomOUdmwcGtFnW1rp6hyR3+CEvpPAZFoCnsX2yL4wCHReBjEh ZvkfW6v2k60JCJ23kSpm27QvxzX8w/oj+7SoF/RHsjPlk3pYgs5RxD6Oq89vFWi45aFz YLTw== 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=TUVXnxS9UAee4IGcNrhCj60q8f8X5T3rof8oi2SOQrg=; b=kU15GDDiY7WO/3APDjqV8l+DH9Fi1MUdxYTJnF9PycFaDg1u0fRtCd+DtymkewFyML O04iaLfVjOd6DeDxk/jGn/JY1SfSPhatUVJAEuRqIKC4dNvYu6LJsBB0Dn4jldRrh4sx EptHtAgs6BXJ4jgfuNLAn2e+Y+vz8B1m29CA+vT+/HHWPXP0IvlSwGXPRHyETOn1ETe+ pFeR8sZQPjwqXFJlIumqS57SfhlnP2r1vSGZCB7yQaQx4zw5Qnl8NqLQO8Kn8GMQtFI5 zYIRvDOUfnwtsDxM6IFLilHZvnwvPkGjaLHEOga45lpL5CuqiPJuy/+k4GNgIyaFvrK6 ubcg== X-Gm-Message-State: APjAAAUHU3ezKSNX0uDm4+peayBj82a8Yw81kqRq9lVOdsNySNNY4IUP nXuIMdJpcbHDKdoI1TvSGJ6gfUO9lllHvwRNBNw= X-Google-Smtp-Source: APXvYqwcdnXDfC2pVIs9baq8TNtgoQoP9LcnkRQbnd9g/xOFvud10khVHRW2cFsHo9HTOSaen+1g0hvVfGtozT5u6UE= X-Received: by 2002:a6b:6c15:: with SMTP id a21mr449933ioh.60.1569505281919; Thu, 26 Sep 2019 06:41:21 -0700 (PDT) MIME-Version: 1.0 References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <1568473196-34972-1-git-send-email-gavin.hu@arm.com> In-Reply-To: <1568473196-34972-1-git-send-email-gavin.hu@arm.com> From: Jerin Jacob Date: Thu, 26 Sep 2019 19:11:10 +0530 Message-ID: To: Gavin Hu Cc: dpdk-dev , nd@arm.com, Thomas Monjalon , Stephen Hemminger , Hemant Agrawal , Jerin Jacob , Pavan Nikhilesh , Honnappa.Nagarahalli@arm.com, ruifeng.wang@arm.com, phil.yang@arm.com, steve.capper@arm.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v6 0/7] use WFE for 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 Sat, Sep 14, 2019 at 8:30 PM Gavin Hu wrote: > > V6: > - squash the RTE_ARM_USE_WFE configuration entry patch into the new API patch > - move the new configuration to the end of EAL > - add doxygen comments to reflect the relaxed and acquire semantics > - correct the meson configuration > V5: > - add doxygen comments for the new APIs > - spinlock early exit without wfe if the spinlock not taken by others. > - add two patches on top for opdl and thunderx > V4: > - rename the config as CONFIG_RTE_ARM_USE_WFE to indicate it applys to arm only > - introduce a macro for assembly Skelton to reduce the duplication of code > - 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 > > 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_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. > > Gavin Hu (7): > bus/fslmc: fix the conflicting dmb function > eal: add the APIs to wait until equal > spinlock: use wfe to reduce contention on aarch64 > ticketlock: use new API to reduce contention on aarch64 > ring: use wfe to wait for ring tail update on aarch64 > net/thunderx: use new API to save cycles on aarch64 > event/opdl: use new API to save cycles on aarch64 There is checkpatch failure. ### eal: add the APIs to wait until equal WARNING:LONG_LINE_COMMENT: line over 80 characters #123: FILE: lib/librte_eal/common/include/generic/rte_pause.h:29: + * Wait for *addr to be updated with a 16-bit expected value, with a relaxed memory With checkpatch fixes: Acked-by: Jerin Jacob