alistair23-linux/Documentation/vm
Konstantin Khlebnikov 77bb499bb6 pagemap: add mmap-exclusive bit for marking pages mapped only here
This patch sets bit 56 in pagemap if this page is mapped only once.  It
allows to detect exclusively used pages without exposing PFN:

present file exclusive state
0       0    0         non-present
1       1    0         file page mapped somewhere else
1       1    1         file page mapped only here
1       0    0         anon non-CoWed page (shared with parent/child)
1       0    1         anon CoWed page (or never forked)

CoWed pages in (MAP_FILE | MAP_PRIVATE) areas are anon in this context.

MMap-exclusive bit doesn't reflect potential page-sharing via swapcache:
page could be mapped once but has several swap-ptes which point to it.
Application could detect that by swap bit in pagemap entry and touch that
pte via /proc/pid/mem to get real information.

See http://lkml.kernel.org/r/CAEVpBa+_RyACkhODZrRvQLs80iy0sqpdrd0AaP_-tgnX3Y9yNQ@mail.gmail.com

Requested by Mark Williamson.

[akpm@linux-foundation.org: fix spello]
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Reviewed-by: Mark Williamson <mwilliamson@undo-software.com>
Tested-by:  Mark Williamson <mwilliamson@undo-software.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-09-08 15:35:28 -07:00
..
.gitignore
00-INDEX
active_mm.txt
balance
cleancache.txt cleancache: forbid overriding cleancache_ops 2015-04-14 16:49:03 -07:00
frontswap.txt
highmem.txt
hugetlbpage.txt mm, doc: cleanup and clarify munmap behavior for hugetlb memory 2015-04-15 16:35:19 -07:00
hwpoison.txt
ksm.txt
numa
numa_memory_policy.txt
overcommit-accounting
page_migration
page_owner.txt
pagemap.txt pagemap: add mmap-exclusive bit for marking pages mapped only here 2015-09-08 15:35:28 -07:00
remap_file_pages.txt
slub.txt
soft-dirty.txt
split_page_table_lock
transhuge.txt
unevictable-lru.txt Documentation/vm/unevictable-lru.txt: clarify MAP_LOCKED behavior 2015-06-24 17:49:44 -07:00
userfaultfd.txt userfaultfd: change the read API to return a uffd_msg 2015-09-04 16:54:41 -07:00
zsmalloc.txt zsmalloc: zsmalloc documentation 2015-04-15 16:35:21 -07:00
zswap.txt zswap: runtime enable/disable 2015-06-25 17:00:37 -07:00