Re: [PATCH v3] mm: add mremap flag for preserving the old mapping

From: Daniel Micay
Date: Thu Oct 02 2014 - 17:10:11 EST


On 30/09/14 01:49 PM, Andy Lutomirski wrote:
>
> I think it might pay to add an explicit vm_op to authorize
> duplication, especially for non-cow mappings. IOW this kind of
> extension seems quite magical for anything that doesn't have the
> normal COW semantics, including for plain old read-only mappings.

Adding a vm_ops table to MAP_PRIVATE|MAP_ANONYMOUS mappings has a
significant performance impact. I haven't yet narrowed it down, but
there's at least one code path a check of `!vma->vm_ops` for the fast
path. One is for transparent huge page faults, so the performance impact
makes sense. I'll use a simpler implementation for now since the
requirements are very narrow / simple.

Attachment: signature.asc
Description: OpenPGP digital signature