Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1387019

Re: [PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU

From Andrew Morton <akpm@linux-foundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU
Date 2016-04-26 02:10 +0200
Message-ID <rrYJI-6tj-9@gated-at.bofh.it> (permalink)
References <rqRKi-Ux-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 22 Apr 2016 18:19:44 -0400 Rich Felker <dalias@libc.org> wrote:

> Subject: [PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU

I take it that "ramfs" was intended here.

> The nommu do_mmap expects f_op->get_unmapped_area to either succeed or
> return -ENOSYS for VM_MAYSHARE (e.g. private read-only) mappings.
> Returning addr in the non-MAP_SHARED case was completely wrong, and
> only happened to work because addr was 0. However, it prevented
> VM_MAYSHARE mappings from sharing backing with the fs cache, and
> forced such mappings (including shareable program text) to be copied
> whenever the number of mappings transitioned from 0 to 1, impacting
> performance and memory usage. Subsequent mappings beyond the first
> still correctly shared memory with the first.
> 
> Instead, treat VM_MAYSHARE identically to VM_SHARED at the file ops
> level; do_mmap already handles the semantic differences between them.
>
> ...
>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU Rich Felker <dalias@libc.org> - 2016-04-23 00:30 +0200
  Re: [PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU Andrew Morton <akpm@linux-foundation.org> - 2016-04-26 02:10 +0200
    Re: [PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU Rich Felker <dalias@libc.org> - 2016-04-26 02:50 +0200
      Re: [PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU Rich Felker <dalias@libc.org> - 2016-04-26 02:50 +0200
        Re: [PATCH] tmpfs: fix VM_MAYSHARE mappings for NOMMU Andrew Morton <akpm@linux-foundation.org> - 2016-04-26 04:50 +0200

csiph-web