From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Burakov, Anatoly" Subject: Re: [PATCH v3 2/2] memalloc: keep in mind a failed MAP_FIXED mmap may still perform an unmap Date: Fri, 1 Jun 2018 16:07:28 +0100 Message-ID: <279b09b4-6425-ccac-e512-003d8a6b3e2a@intel.com> References: <1527860361-162114-1-git-send-email-dariuszx.stojaczyk@intel.com> <1527857960-109306-1-git-send-email-dariuszx.stojaczyk@intel.com> <1527857960-109306-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 Cc: stable@dpdk.org To: Dariusz Stojaczyk , dev@dpdk.org Return-path: In-Reply-To: <1527857960-109306-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:59 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 hugetlbfs with no space > left, and the previous anonymous mapping was still > being removed. > > Changes from v2: > * added "git fixline" tags > > Changes from v1: > * checkpatch fixes > * remapping is now done regardless of the mmap errno > > Fixes: 582bed1e1d1d ("mem: support mapping hugepages at runtime") > Cc: anatoly.burakov@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Dariusz Stojaczyk > --- Acked-by: Anatoly Burakov Version changes should not be part of commit message. Thomas, could you please fix this on apply? -- Thanks, Anatoly