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

2014-10-02 Thread Daniel Micay
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

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

2014-09-30 Thread Daniel Micay
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

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

2014-09-30 Thread Andy Lutomirski
On Sep 30, 2014 2:36 AM, "Daniel Micay" wrote: > > On 30/09/14 01:53 AM, Andy Lutomirski wrote: > > On Mon, Sep 29, 2014 at 9:55 PM, Daniel Micay wrote: > >> This introduces the MREMAP_RETAIN flag for preserving the source mapping > >> when MREMAP_MAYMOVE moves the pages to a new destination. Acc

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

2014-09-30 Thread Daniel Micay
On 30/09/14 01:53 AM, Andy Lutomirski wrote: > On Mon, Sep 29, 2014 at 9:55 PM, Daniel Micay wrote: >> This introduces the MREMAP_RETAIN flag for preserving the source mapping >> when MREMAP_MAYMOVE moves the pages to a new destination. Accesses to >> the source location will fault and cause fresh

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

2014-09-29 Thread Andy Lutomirski
On Mon, Sep 29, 2014 at 9:55 PM, Daniel Micay wrote: > This introduces the MREMAP_RETAIN flag for preserving the source mapping > when MREMAP_MAYMOVE moves the pages to a new destination. Accesses to > the source location will fault and cause fresh pages to be mapped in. > > For consistency, the o

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

2014-09-29 Thread Daniel Micay
This introduces the MREMAP_RETAIN flag for preserving the source mapping when MREMAP_MAYMOVE moves the pages to a new destination. Accesses to the source location will fault and cause fresh pages to be mapped in. For consistency, the old_len >= new_len case could decommit the pages instead of unma