From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jianbo Liu Subject: Re: [PATCH V7 3/3] ring: introduce new header file to support C11 memory model Date: Mon, 4 Dec 2017 16:05:57 +0800 Message-ID: <20171204080556.GC28917@arm.com> References: <1511748024-7245-1-git-send-email-hejianet@gmail.com> <1512352212-7191-1-git-send-email-hejianet@gmail.com> <1512352212-7191-4-git-send-email-hejianet@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org, Jerin Jacob , Jan Viktorin , Olivier Matz , Thomas Monjalon , konstantin.ananyev@intel.com, hemant.agrawal@nxp.com, Jia He To: Jia He Return-path: Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50062.outbound.protection.outlook.com [40.107.5.62]) by dpdk.org (Postfix) with ESMTP id 4D75F1D90 for ; Mon, 4 Dec 2017 09:07:25 +0100 (CET) Content-Disposition: inline In-Reply-To: <1512352212-7191-4-git-send-email-hejianet@gmail.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The 12/03/2017 17:50, Jia He wrote: > To support C11 memory model barrier, 2 options are suggested by Jerin: > 1. use rte_smp_rmb > 2. use load_acquire/store_release(refer to [1]). > CONFIG_RTE_RING_USE_C11_MEM_MODEL is provided, and by default it is "y" > only on arm64 so far. > > The reason why providing 2 options is due to the performance benchmark > difference in different arm machines, refer to [2]. > > We haven't tested on ppc64. If anyone verifies it, he can add > CONFIG_RTE_RING_USE_C11_MEM_MODEL=3Dy to ppc64 config files. > > [1] https://github.com/freebsd/freebsd/blob/master/sys/sys/buf_ring.h#L17= 0 > [2] http://dpdk.org/ml/archives/dev/2017-October/080861.html > > Signed-off-by: Jia He > Suggested-by: Jerin Jacob > Acked-by: Jerin Jacob Acked-by: Jianbo Liu > --- > config/common_armv8a_linuxapp | 2 + > lib/librte_ring/Makefile | 3 +- > lib/librte_ring/rte_ring.h | 14 ++- > lib/librte_ring/rte_ring_c11_mem.h | 186 +++++++++++++++++++++++++++++++= ++++++ > 4 files changed, 203 insertions(+), 2 deletions(-) > create mode 100644 lib/librte_ring/rte_ring_c11_mem.h > IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.