From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v12 0/3] mempool: add external mempool manager Date: Thu, 16 Jun 2016 10:47:03 +0200 Message-ID: <57626787.6090709@6wind.com> References: <1465919341-3209-1-git-send-email-david.hunt@intel.com> <1465976824-83823-1-git-send-email-david.hunt@intel.com> <20160615121358.5ef9f142@pcviktorin.fit.vutbr.cz> <57614043.9090603@intel.com> <57614402.6020708@6wind.com> <576183AD.8070200@intel.com> <576184F7.3040206@6wind.com> <576259A2.4090200@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, jerin.jacob@caviumnetworks.com, shreyansh.jain@nxp.com To: "Hunt, David" , Jan Viktorin Return-path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 1C34FC3EE for ; Thu, 16 Jun 2016 10:47:08 +0200 (CEST) In-Reply-To: <576259A2.4090200@intel.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 06/16/2016 09:47 AM, Hunt, David wrote: > > > On 15/6/2016 5:40 PM, Olivier MATZ wrote: >> >> >> On 06/15/2016 06:34 PM, Hunt, David wrote: >>> >>> >>> On 15/6/2016 1:03 PM, Olivier MATZ wrote: >>>> [...] >>>> >>>> The opaque pointer would be saved in mempool structure, and used >>>> when the mempool is populated (calling mempool_ops_alloc). >>>> The type of the structure pointed by the opaque has to be defined >>>> (and documented) into each mempool_ops manager. >>>> >>>> >>>> Olivier >>> >>> >>> OK, just to be sure before I post another patchset..... >>> >>> For the rte_mempool_struct: >>> struct rte_mempool_memhdr_list mem_list; /**< List of memory >>> chunks */ >>> + void *ops_args; /**< optional args for ops >>> alloc. */ >>> >>> (at the end of the struct, as it's just on the control path, not to >>> affect fast path) >> >> Hmm, I would put it just after pool_data. >> > > When I move it to just after pool data, the performance of the > mempool_perf_autotest drops by 2% on my machine for the local cache tests. > I think I should leave it where I suggested. I don't really see what you call control path and data path here. For me, all the fields in mempool structure are not modified once the mempool is initialized. http://dpdk.org/browse/dpdk/tree/lib/librte_mempool/rte_mempool.h?id=ce94a51ff05c0a4b63177f8a314feb5d19992036#n201 So I don't think we should have more cache misses whether it's placed at the beginning or at the end. Maybe I'm missing something... I still believe it's better to group the 2 fields as they are tightly linked together. It could be at the end if you see better performance.