From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH, v2] mempool: avoid memory waste with large pagesize Date: Thu, 10 Mar 2016 20:09:44 -0800 Message-ID: <20160310200944.1b820a74@xeon-e3> References: <1457557926-4056-1-git-send-email-stephen@networkplumber.org> <56E1325C.2030206@6wind.com> <56E150FD.2090403@intel.com> <56E1568C.5020805@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Olivier MATZ Return-path: Received: from mail-pa0-f53.google.com (mail-pa0-f53.google.com [209.85.220.53]) by dpdk.org (Postfix) with ESMTP id ADACC3B5 for ; Fri, 11 Mar 2016 05:09:33 +0100 (CET) Received: by mail-pa0-f53.google.com with SMTP id fe3so66886613pab.1 for ; Thu, 10 Mar 2016 20:09:33 -0800 (PST) In-Reply-To: <56E1568C.5020805@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 10 Mar 2016 12:12:12 +0100 Olivier MATZ wrote: > >> It still does not work. When CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=y: > >> > >> mp = rte_mempool_create("test", 128, > >> 64, 0, 0, NULL, NULL, NULL, NULL, SOCKET_ID_ANY, 0); > >> rte_mempool_dump(stdout, mp); > >> > >> populated_size=128 > >> header_size=64 > >> elt_size=64 > >> trailer_size=64 > >> total_obj_size=192 > >> > > With --no-huge (since patch updates that part), it gives: > > header_size=64 > > elt_size=64 > > trailer_size=0 > > total_obj_size=128 > > private_data_size=3904 > > > > 1- private_data still rounds to page size, not sure if this is a problem. > > 2- with MEMPOOL_DEBUG=y, trailer_size is 0, comment in code says it > > should keep cookie, not sure if this is a problem. > > Yes the trailer should at least be 8 bytes to store the cookie. > Ok, will fix. that.