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 4B515A053B; Fri, 17 Jul 2020 15:58:52 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E84891C000; Fri, 17 Jul 2020 15:58:50 +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 EEC571BF90 for ; Fri, 17 Jul 2020 15:58:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594994329; 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: in-reply-to:in-reply-to:references:references; bh=uJmgpOzSuZjpv3drPbbYccU+bsw1SHc3ylY3hL1i8ag=; b=go7k0Nsb7pG+8gJsJuNKWvXdcjR8u/1gZBu7WOrMRliBHLmZbJaxynIzQz850ohAbX9EDg ZjlARlspGCfHbvxTYT4XBgw5cVC4PMx7C0RzqjSLfneWZQxKFrIYmsgVGjLWCLoBiCxMl4 oy4VJm2iYTPvl17FusbPGXCjkshxUCk= Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-167-Hga_tj62OpCE1394CmYJNw-1; Fri, 17 Jul 2020 09:58:45 -0400 X-MC-Unique: Hga_tj62OpCE1394CmYJNw-1 Received: by mail-ua1-f72.google.com with SMTP id h10so1736673uar.6 for ; Fri, 17 Jul 2020 06:58:45 -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=uJmgpOzSuZjpv3drPbbYccU+bsw1SHc3ylY3hL1i8ag=; b=ZiBTOD04hxfJLyWtBjxO+u4xBM3RXSpxvo9A26orjfsIsJzF0mhRq7EIaM04PVYHHJ PLZOCSf04ZFugBT0I71JW03KrF2rt6EdUvXu6eQ3eLqTpjLpfuZB4EbzU/8qsMjq9jXv 3job7Fad984DHOEgbpSjwq1GekfNX/1TpCVRidxkcAwV0AqCyP+kloJXeuhgJy4Cxx7b Zv/UbCtievAcoM1W81y8/mN2AikUt950DpKlkE28D00+NmHdQHb7K5x2vmsOj326hRkY FGqqRkwWbcksfDHdSszsbAnr+tUkZLcT6imuWzpcFVUVA0E69Du4WBjYPCe2X3hp/bsw ueyA== X-Gm-Message-State: AOAM533ZQ52XqQ0wvw/SknZoCBopcc0WiuFF29l4uieN26yxOaa5FqbR TFiqifaFtoOi6oSpy8MrC2fX52+a8vcdnsYjRcjLiW8In2iKCXoVudi/YMusLyyfe/sxvOhhk5V bjMHPq8yCEUODHuhw8qY= X-Received: by 2002:a67:26c2:: with SMTP id m185mr7318685vsm.39.1594994324821; Fri, 17 Jul 2020 06:58:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7nxLbBdRw8ffVVkCtdUnn6huLQmwqliHRAze3vneMMVdW3iYVN8vNx4miCjRN5MSTUqwtXTWr5uOkW9fuvSk= X-Received: by 2002:a67:26c2:: with SMTP id m185mr7318658vsm.39.1594994324548; Fri, 17 Jul 2020 06:58:44 -0700 (PDT) MIME-Version: 1.0 References: <1594962519-20619-1-git-send-email-phil.yang@arm.com> <1594980877-26540-1-git-send-email-phil.yang@arm.com> In-Reply-To: <1594980877-26540-1-git-send-email-phil.yang@arm.com> From: David Marchand Date: Fri, 17 Jul 2020 15:58:32 +0200 Message-ID: To: Phil Yang Cc: Thomas Monjalon , dev , "Mcnamara, John" , Honnappa Nagarahalli , David Christensen , Jerin Jacob Kollanukkaran , "Ananyev, Konstantin" , Ola Liljedahl , Bruce Richardson , "Ruifeng Wang (Arm Technology China)" , nd X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v10 0/3] generic rte atomic APIs deprecate proposal 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, Jul 17, 2020 at 12:15 PM Phil Yang wrote: > > DPDK provides generic rte_atomic APIs to do several atomic operations. > These APIs are using the deprecated __sync builtins and enforce full > memory barriers on aarch64. However, full barriers are not necessary > in many use cases. In order to address such use cases, C language offers > C11 atomic APIs. The C11 atomic APIs provide finer memory barrier control > by making use of the memory ordering parameter provided by the user. > Various patches submitted in the past [2] and the patches in this series > indicate significant performance gains on multiple aarch64 CPUs and no > performance loss on x86. > > But the existing rte_atomic API implementations cannot be changed as the > APIs do not take the memory ordering parameter. The only choice available > is replacing the usage of the rte_atomic APIs with C11 atomic APIs. In > order to make this change, the following steps are proposed: > > [1] deprecate rte_atomic APIs so that future patches do not use rte_atomic > APIs (a script is added to flag the usages). > [2] refactor the code that uses rte_atomic APIs to use c11 atomic APIs. > > This patchset contains: > 1) changes to programmer guide describing writing efficient code for aarch64. > 2) wraps up __atomic_thread_fence with explicit memory ordering parameter. > 3) the checkpatch script changes to flag rte_atomicNN_xxx and rte_smp_[r/w]mb > APIs usage in patches. Series applied, thanks. The removal of the legacy atomic will be in a future release. Can you prepare a patch updating the deprecation notices to announce this removal? This will be the occasion to discuss the timing. -- David Marchand