Re: [PATCH 0/5] mm: support parallel free of memory

From: Dave Hansen
Date: Tue Feb 28 2017 - 19:43:49 EST


On 02/28/2017 04:39 PM, Andrew Morton wrote:
> Dumb question: why not do this in userspace, presumably as part of the
> malloc() library? malloc knows where all the memory is and should be
> able to kick off N threads to run around munmapping everything?

One of the places we saw this happen was when an app crashed and was
exit()'ing under duress without cleaning up nicely. The time that it
takes to unmap a few TB of 4k pages is pretty excessive.