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 1A2C0A317C for ; Thu, 17 Oct 2019 20:37:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D78321EA11; Thu, 17 Oct 2019 20:37:22 +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 403311E9F9 for ; Thu, 17 Oct 2019 20:37:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571337440; 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=k2TWabQ9PWIBPCHV+yjW54SfIQPEs34tyUQjNulRDQo=; b=JTdw5aIRW6GDBNkl1foLhtezCgbCSR/Agyv0Y3/gabng/vtiC5ViaNWkfeDuS8KBFPLS3x bX2npMUVLAtpbEpPofobur9h6NGoFEP5Hv8bI8IO3QaUkckcIj1MP07gPkyVxnTTKcZeMz Ysi/btsH5rlIDkaliShzObjH/j6JkNc= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-37-g8fE1NkdO5as4act3dx2Vg-1; Thu, 17 Oct 2019 14:37:18 -0400 Received: by mail-vk1-f200.google.com with SMTP id q5so1292491vkg.20 for ; Thu, 17 Oct 2019 11:37:18 -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=aHTOFnrgYXqoM8yk2uRlD99qbO+DuVgZkemqCr7z4I8=; b=ky+q8iLO8PpJZO7A9OlykrVuhndb+QUKmHguxOwaelnFW4edWeTUmtsr1Of5wEjqtO CATsFNxMvsnyToFbjRG6e7AqfOiepQSsN63AXKJeBbmIQsrpVTVHyMoe9FcN49bC2jS+ uAhZcDu3DBB3NpazvvDQ/HiqWK6C4B85O6fnqWEusH3QSIDN8Xcc+0873dxPJLG1MCIj d/1Gsk0eo7kaNc5ysX3KKZEOAaVkbof6PDsmuXco2EHeCXZrVK8HkMXID0KKRdBzhvOc /iSf+V1Hkzf0bAxxjQQUbKWn3sfnfay5dWJHMCC/v1GoXb4zZu/qGytI3thjXG7pexwh VFYw== X-Gm-Message-State: APjAAAWLr528wg6D+wOvmeqJqbPSjbiOuKair4pONwRNdDeKleYw/5V7 Q5fA9oXH+++zKkLvi7mpmFERG9xuqVryEcsjf1Gq+gHnNlJpRI+L8rlG//Nq9Me6ZSFP901RVgP idNzURH8L1NcRhhMGUCM= X-Received: by 2002:ab0:304e:: with SMTP id x14mr3147248ual.41.1571337438073; Thu, 17 Oct 2019 11:37:18 -0700 (PDT) X-Google-Smtp-Source: APXvYqzTbi+tc5N8Ls6CJYb1MzkDlMl2rY3e8xsi50Hv+OLiFHzfNm/rIhyw3tb8hWQAiGNgyaoG1q1B5epIUercQ/w= X-Received: by 2002:ab0:304e:: with SMTP id x14mr3147218ual.41.1571337437635; Thu, 17 Oct 2019 11:37:17 -0700 (PDT) MIME-Version: 1.0 References: <1561911676-37718-1-git-send-email-gavin.hu@arm.com> <1569562904-43950-1-git-send-email-gavin.hu@arm.com> In-Reply-To: <1569562904-43950-1-git-send-email-gavin.hu@arm.com> From: David Marchand Date: Thu, 17 Oct 2019 20:37:06 +0200 Message-ID: To: Gavin Hu Cc: dev , nd , Thomas Monjalon , Stephen Hemminger , Hemant Agrawal , Jerin Jacob Kollanukkaran , Pavan Nikhilesh , Honnappa Nagarahalli , "Ruifeng Wang (Arm Technology China)" , Phil Yang , Steve Capper X-MC-Unique: g8fE1NkdO5as4act3dx2Vg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v7 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 Fri, Sep 27, 2019 at 7:42 AM Gavin Hu wrote: > > V7: > - fix the checkpatch LONG_LINE_COMMENT issue > V6: > - squash the RTE_ARM_USE_WFE configuration entry patch into the new API p= atch > - 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 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 > > 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. > > 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 Sent comments on the 3 first patches, the rest looks good to me. > 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 Thanks. --=20 David Marchand