Re: [PATCH v2] mm: Add MREMAP_DONTUNMAP to mremap().

From: Brian Geffon
Date: Sat Feb 01 2020 - 23:19:33 EST


On Wed, Jan 29, 2020 at 11:46 AM Kirill A. Shutemov
<kirill@xxxxxxxxxxxxx> wrote:
> Any better options for the flag name? (I have none)

The other option is that it's broken up into two new flags the first
MREMAP_MUSTMOVE which can be used regardless of whether or not you're
leaving the original mapping mapped. This would do exactly what it
describes: move the mapping to a new address with or without
MREMAP_FIXED, this keeps consistency with MAYMOVE.

The second flag would be the new MREMAP_DONTUNMAP flag which requires
MREMAP_MUSTMOVE, again with or without MREMAP_FIXED.

What are your thoughts on this?