From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 58F6B2BC9 for ; Tue, 8 Mar 2016 21:53:05 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga104.fm.intel.com with ESMTP; 08 Mar 2016 12:45:20 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,558,1449561600"; d="scan'208";a="932491378" Received: from orsmsx101.amr.corp.intel.com ([10.22.225.128]) by fmsmga002.fm.intel.com with ESMTP; 08 Mar 2016 12:45:20 -0800 Received: from orsmsx111.amr.corp.intel.com (10.22.240.12) by ORSMSX101.amr.corp.intel.com (10.22.225.128) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 8 Mar 2016 12:45:19 -0800 Received: from orsmsx102.amr.corp.intel.com ([169.254.3.42]) by ORSMSX111.amr.corp.intel.com ([169.254.12.9]) with mapi id 14.03.0248.002; Tue, 8 Mar 2016 12:45:19 -0800 From: "Venkatesan, Venky" To: Olivier MATZ , "Hunt, David" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 2/6] mempool: add stack (lifo) based external mempool handler Thread-Index: AQHRaxnor6OPN8EbTkOd9prgrBOQFp9QH+/g Date: Tue, 8 Mar 2016 20:45:19 +0000 Message-ID: <1FD9B82B8BF2CF418D9A1000154491D97EC6711B@ORSMSX102.amr.corp.intel.com> References: <1453829155-1366-1-git-send-email-david.hunt@intel.com> <1455634095-4183-1-git-send-email-david.hunt@intel.com> <1455634095-4183-3-git-send-email-david.hunt@intel.com> <56C71919.50506@6wind.com> In-Reply-To: <56C71919.50506@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_IC x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNGJjYjg3MGUtMGIxNi00OTFmLWEwOTctZThlYjgyNjlhNjZjIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IklTR3QwSXRKQTVNXC9YRUcxc1g5RkZYRzJhVm9qRVgxdDhpNUE2RHE4QUZrPSJ9 x-originating-ip: [10.22.254.138] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH 2/6] mempool: add stack (lifo) based external mempool handler X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2016 20:53:05 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Olivier MATZ > Sent: Friday, February 19, 2016 5:31 AM > To: Hunt, David ; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH 2/6] mempool: add stack (lifo) based > external mempool handler >=20 > Hi David, >=20 > On 02/16/2016 03:48 PM, David Hunt wrote: > > adds a simple stack based mempool handler > > > > Signed-off-by: David Hunt > > --- > > lib/librte_mempool/Makefile | 2 +- > > lib/librte_mempool/rte_mempool.c | 4 +- > > lib/librte_mempool/rte_mempool.h | 1 + > > lib/librte_mempool/rte_mempool_stack.c | 164 > > +++++++++++++++++++++++++++++++++ > > 4 files changed, 169 insertions(+), 2 deletions(-) create mode > > 100644 lib/librte_mempool/rte_mempool_stack.c > > >=20 > I don't get what is the purpose of this handler. Is it an example or is i= t > something that could be useful for dpdk applications? >=20 This is actually something that is useful for pipelining apps, where the me= mpool cache doesn't really work - example, where we have one core doing rx = (and alloc), and another core doing Tx (and return). In such a case, the me= mpool ring simply cycles through all the mbufs, resulting in a LLC miss on = every mbuf allocated when the number of mbufs is large. A stack recycles bu= ffers more effectively in this case. > If it's an example, we should find a way to put the code outside the > librte_mempool library, maybe in the test program. I see there is also a > "custom handler". Do we really need to have both? >=20 >=20 > Regards, > Olivier >=20