From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH v3 5/9] memalloc: track page fd's in non-single file mode Date: Thu, 13 Sep 2018 17:56:53 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: tiwei.bie@intel.com, ray.kinsella@intel.com, zhihong.wang@intel.com, kuralamudhan.ramakrishnan@intel.com To: Anatoly Burakov , dev@dpdk.org Return-path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id B26661B027 for ; Thu, 13 Sep 2018 17:56:58 +0200 (CEST) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 09/04/2018 05:15 PM, Anatoly Burakov wrote: > Previously, we were only tracking lock file fd's in single-file > segments mode, but did not track fd's in non-single file mode > because we didn't need to (mmap() call still kept the lock). Now > that we are going to expose these fd's to the world, we need to > have access to them, so track them even in non-single file > segments mode. > > We don't need to close fd's after mmap() because we're still > tracking them in an fd list. Also, for anonymous hugepages mode, > fd will always be -1 so exit early on error. > > Signed-off-by: Anatoly Burakov > --- > lib/librte_eal/linuxapp/eal/eal_memalloc.c | 44 ++++++++++++---------- > 1 file changed, 25 insertions(+), 19 deletions(-) > Reviewed-by: Maxime Coquelin