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 9692D4C95 for ; Fri, 1 Jun 2018 13:08:35 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Jun 2018 04:08:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,465,1520924400"; d="scan'208";a="60413860" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.237.220.101]) ([10.237.220.101]) by fmsmga001.fm.intel.com with ESMTP; 01 Jun 2018 04:08:33 -0700 To: Dariusz Stojaczyk , dev@dpdk.org References: <1527857469-159391-1-git-send-email-dariuszx.stojaczyk@intel.com> <1527857469-159391-2-git-send-email-dariuszx.stojaczyk@intel.com> From: "Burakov, Anatoly" Message-ID: <124961f4-c55f-10e6-7f5c-c0767f3b0bd4@intel.com> Date: Fri, 1 Jun 2018 12:08:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1527857469-159391-2-git-send-email-dariuszx.stojaczyk@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/2] memalloc: keep in mind a failed MAP_FIXED mmap may still perform an unmap 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: Fri, 01 Jun 2018 11:08:36 -0000 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