From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CC5A830024FE; Thu, 13 Sep 2018 15:56:57 +0000 (UTC) Received: from [10.36.112.13] (unknown [10.36.112.13]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 64B345D6B5; Thu, 13 Sep 2018 15:56:55 +0000 (UTC) To: Anatoly Burakov , dev@dpdk.org Cc: tiwei.bie@intel.com, ray.kinsella@intel.com, zhihong.wang@intel.com, kuralamudhan.ramakrishnan@intel.com References: From: Maxime Coquelin Message-ID: Date: Thu, 13 Sep 2018 17:56:53 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Thu, 13 Sep 2018 15:56:57 +0000 (UTC) Subject: Re: [dpdk-dev] [PATCH v3 5/9] memalloc: track page fd's in non-single file mode 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: , X-List-Received-Date: Thu, 13 Sep 2018 15:56:59 -0000 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