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 880E6A0528; Mon, 20 Jan 2020 13:29:42 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0E0461515; Mon, 20 Jan 2020 13:29:41 +0100 (CET) Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by dpdk.org (Postfix) with ESMTP id 60C751252 for ; Mon, 20 Jan 2020 13:29:39 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 9957B5CEF; Mon, 20 Jan 2020 07:29:38 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 20 Jan 2020 07:29:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=yJqS7u8kEOfnZMqxX2MGF/KHTyLDQ/KczaOTkzb/9Sc=; b=baUKXy4jz8Cy IfJiu+pFfJwkhaCeQRZk0JaI9wxMyTP+GIwwIY2yFrBn62Wvm5/Adzh8wAjjoo4E LdDSE2ZM4t5WpqJ9s6o4wQyh4P5I8lyyZJ05G6E+yNImi7hLnb010pXftTwSgXlN HaqPHVtVeZv4deZnIb3vgP2YIB02W80= 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-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=yJqS7u8kEOfnZMqxX2MGF/KHTyLDQ/KczaOTkzb/9 Sc=; b=AF4gVJ60xDdEz2cwUgnt80t1MEHP/kDnqwHRg421j4xytxpzCzVOu1jpA zWLCdLBPF2yVB6DUpTj9kWDurnRHTWM5sKksMrN1x/G6jaAqUjL8RdHk9RmjBCnM vBe4n9h4+Xe1yZqupx1PijZ7jUveQ7ThaGA0+8RJdwaeBY5Ys2gr2ECttjJwdx4U LBznp+iWk9TcewuYcIdWKUHqCTlabcI9qHh47cZhK3ZzVi6XIJhr0SvwhC7uOPBZ O+gjsBJWCxjz82M+do4WCSVXRU75mznast1jwflq/QeUA0yV8Ouqc09pJrwJwMgt pI1LI/9j0baKzByHNJ6z6hnugDp8g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehgddvkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucffoh hmrghinhepmhgrihhlqdgrrhgthhhivhgvrdgtohhmpdhhuhgrrhhmrdgtohhmnecukfhp peejjedrudefgedrvddtfedrudekgeenucevlhhushhtvghrufhiiigvpedtnecurfgrrh grmhepmhgrihhlfhhrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 2890680059; Mon, 20 Jan 2020 07:29:36 -0500 (EST) From: Thomas Monjalon To: Jerin Jacob Cc: Jerin Jacob , dev@dpdk.org, dpdk-dev , Andrew Rybchenko , "Richardson, Bruce" , "Ananyev, Konstantin" , Hemant Agrawal , Shahaf Shuler , Honnappa Nagarahalli , Gavin Hu , Jan Viktorin , David Christensen , Anatoly Burakov , Olivier Matz Date: Mon, 20 Jan 2020 13:29:34 +0100 Message-ID: <2816605.f0I1acK8xe@xps> In-Reply-To: <20200120122459.GH14387@glumotte.dev.6wind.com> References: <20200113064941.2749356-1-jerinj@marvell.com> <20200120122459.GH14387@glumotte.dev.6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v4] mempool: remove memory wastage on non x86 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" 20/01/2020 13:24, Olivier Matz: > On Thu, Jan 16, 2020 at 06:40:23PM +0530, Jerin Jacob wrote: > > On Wed, Jan 15, 2020 at 2:35 AM wrote: > > > > > > From: Jerin Jacob > > > > > > The existing optimize_object_size() function address the memory object > > > alignment constraint on x86 for better performance. > > > > > > Different (micro) architecture may have different memory alignment > > > constraint for better performance and it not the same as the existing > > > optimize_object_size(). > > > > > > Some use, XOR(kind of CRC) scheme to enable DRAM channel distribution > > > based on the address and some may have a different formula. > > > > > > Introducing arch_mem_object_align() function to abstract > > > the difference between different (micro) architectures to avoid > > > wasting memory for mempool object alignment for the architecture > > > that it is not required to do so. > > > > > > Details on the amount of memory saving: > > > > > > Currently, arm64 based architectures use the default (nchan=4, > > > nrank=1). The worst case is for an object whose size (including mempool > > > header) is 2 cache lines, where it is optimized to 3 cache lines (+50%). > > > > > > Examples for cache lines size = 64: > > > orig optimized > > > 64 -> 64 +0% > > > 128 -> 192 +50% > > > 192 -> 192 +0% > > > 256 -> 320 +25% > > > 320 -> 320 +0% > > > 384 -> 448 +16% > > > ... > > > 2304 -> 2368 +2.7% (~mbuf size) > > > > > > Additional details: > > > https://www.mail-archive.com/dev@dpdk.org/msg149157.html > > > > > > Signed-off-by: Jerin Jacob > > > Reviewed-by: Gavin Hu > > > > Ping for merge. > > Acked-by: Olivier Matz Applied, thanks