diff options
| author | Rich Felker <[email protected]> | 2016-05-20 16:57:47 -0700 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2016-05-20 17:58:30 -0700 |
| commit | 63678c32e209bd165f33432bbed72b2954ce5ae4 (patch) | |
| tree | 8e94976dbe50b78ca23292fe9cf5d69c580e3170 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
| parent | f4fcd55841fc9e46daac553b39361572453c2b88 (diff) | |
tmpfs/ramfs: fix VM_MAYSHARE mappings for NOMMU
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.
Signed-off-by: Rich Felker <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Greg Ungerer <[email protected]>
Cc: Geert Uytterhoeven <[email protected]>
Cc: Yoshinori Sato <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions