From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH 2/2] memalloc: keep in mind a failed MAP_FIXED mmap may still perform an unmap Date: Fri, 1 Jun 2018 12:08:33 +0100 Message-ID: <124961f4-c55f-10e6-7f5c-c0767f3b0bd4@intel.com> References: <1527857469-159391-1-git-send-email-dariuszx.stojaczyk@intel.com> <1527857469-159391-2-git-send-email-dariuszx.stojaczyk@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: Dariusz Stojaczyk , dev@dpdk.org Return-path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 9692D4C95 for ; Fri, 1 Jun 2018 13:08:35 +0200 (CEST) In-Reply-To: <1527857469-159391-2-git-send-email-dariuszx.stojaczyk@intel.com> 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 01-Jun-18 1:51 PM, Dariusz Stojaczyk wrote: > This isn't documented in the manuals, but a failed > mmap(..., MAP_FIXED) may still unmap overlapping > regions. In such case, we need to remap these regions > back into our address space to ensure mem contiguity. > We do it unconditionally now on mmap failure just to > be safe. > > Verified on Linux 4.9.0-4-amd64. I was getting > ENOMEM when trying to map in hugetlbfs with no space > left, but the previous anonymous mapping was still > being removed. > > Signed-off-by: Dariusz Stojaczyk > --- Does this also happen with other error values? -- Thanks, Anatoly