From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 915291B304 for ; Fri, 19 Jan 2018 00:55:04 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 10AF620BFD; Thu, 18 Jan 2018 18:55:04 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 18 Jan 2018 18:55:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=nTMixUgDXu19AwH6On0SUuECX5 un8gQDCB+6avKlkO8=; b=cRcErK03azeRLrVtQwXeXp7B/0KJL7B+qecWVvsnzl AbLe1dZhhW3tY2FaDjOxpCAfDTQqw/tn6MexanqtSXp9j++VUlEV57YDxkYtO2wU nQHawrmguHrT1UVNI/YAc03/THcY22AB3HFcwMRSDQK1nODStq0dc7vLWauEQiqw Q= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=nTMixU gDXu19AwH6On0SUuECX5un8gQDCB+6avKlkO8=; b=fnG1w1qrNDEMDyxCqLzSLn Vojakk4JFPf2F8XtiigYsQ7/6kiR7clw373HjbVIapDZXQHry+Q/n1o3vVMAagtV 8oA45e90BzEa/iaFhrjKnvAIlnv7jh1RsI2qRKxeF3RKWHMj8ZXZsyU0sUdQq0QT NG8/M8Njqd++4cvtvaai/8b7HZnR37mO7K0BkuOAuU3fNNwLqh1kRYznkGfVqE5z Y8dy2segXnN9Ym9xRxQZtWQXk4x+Mn5nG2+L4ZvCmgOgNkHCDSTWAC0ihE7m8ga5 f8Owl1v88se9TpXhuhmhxw8OMqUVnmJEXF1ATGrqrS/mM3JV7MId9IIRrjlJJ7NA == X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 6DD6124636; Thu, 18 Jan 2018 18:55:03 -0500 (EST) From: Thomas Monjalon To: Herbert Guan Cc: dev@dpdk.org, "jerin.jacob@caviumnetworks.com" , nd Date: Fri, 19 Jan 2018 00:54:29 +0100 Message-ID: <1629453.H12Nu1u4Xd@xps> In-Reply-To: <6835875.KleASt5oKJ@xps> References: <1511768985-21639-1-git-send-email-herbert.guan@arm.com> <6835875.KleASt5oKJ@xps> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v5] arch/arm: optimization for memcpy 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: , X-List-Received-Date: Thu, 18 Jan 2018 23:55:04 -0000 Ping Are we targetting to integrate this optimization in DPDK 18.02? I am expecting a v6, thanks. 15/01/2018 12:37, Thomas Monjalon: > 15/01/2018 11:57, Herbert Guan: > > Hi Thomas, > > > > From: Thomas Monjalon [mailto:thomas@monjalon.net] > > > Hi, > > > > > > All the code is using ARM64, but the title suggests AArch64. > > > What is the difference between AArch64 and ARM64 (and ARMv8)? > > > > AArch64 and ARM64 refer to the same thing. AArch64 refers to the 64-bit architecture introduced since ARMv8-A. But the Linux kernel community calls it as ARM64. As to DPDK, in most existing compile flags, ARM64 is used. So this patch keeps the ARM64 naming in newly added compile options. > > So please let's continue to call it ARM64. > > > > 04/01/2018 11:20, Herbert Guan: > > > > +#define RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) \ > > > > + ((uintptr_t)(dst) & RTE_ARM64_MEMCPY_ALIGN_MASK) #else > > > > +/* Both dst and src unalignment will be treated as unaligned copy */ > > > > +#define RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) \ > > > > + (((uintptr_t)(dst) | (uintptr_t)(src)) & > > > > +RTE_ARM64_MEMCPY_ALIGN_MASK) #endif > > > > + > > > > + > > > > +/* > > > > + * If copy size is larger than threshold, memcpy() will be used. > > > > + * Run "memcpy_perf_autotest" to determine the proper threshold. > > > > + */ > > > > +#define RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD > > > ((size_t)(0xffffffff)) > > > > +#define RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD > > > ((size_t)(0xffffffff)) > > > > + > > > > +/* > > > > + * The logic of USE_RTE_MEMCPY() can also be modified to best fit > > > platform. > > > > + */ > > > > +#define USE_RTE_MEMCPY(dst, src, n) \ > > > > +((!RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) && \ n <= > > > > +RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD) \ > > > > +|| (RTE_ARM64_MEMCPY_IS_UNALIGNED_COPY(dst, src) && \ > > > > +n <= RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD)) > > > > + > > > > +/************************************** > > > > + * End of customization section > > > > + **************************************/ > > > > > > Modifying the code to asjust the platform is not easy for deployment. > > > Can we move some customization variables inside the configuration file? > > > > RTE_ARM64_MEMCPY_ALIGNED_THRESHOLD and RTE_ARM64_MEMCPY_UNALIGNED_THRESHOLD are the 2 parameters can be configured during build-time. The values can be specified with the best values for the target platform. Usually it's not necessary to change the expression, the comment added in the code is just to raise the hint that this code piece can be modified. > > The build time configuration must be set in the config file > (config/common_armv8a_linuxapp). > v6 please? >