kernel-ark/Documentation/vm
Konstantin Khlebnikov 052fb0d635 proc: report file/anon bit in /proc/pid/pagemap
This is an implementation of Andrew's proposal to extend the pagemap file
bits to report what is missing about tasks' working set.

The problem with the working set detection is multilateral.  In the criu
(checkpoint/restore) project we dump the tasks' memory into image files
and to do it properly we need to detect which pages inside mappings are
really in use.  The mincore syscall I though could help with this did not.
 First, it doesn't report swapped pages, thus we cannot find out which
parts of anonymous mappings to dump.  Next, it does report pages from page
cache as present even if they are not mapped, and it doesn't make that has
not been cow-ed.

Note, that issue with swap pages is critical -- we must dump swap pages to
image file.  But the issues with file pages are optimization -- we can
take all file pages to image, this would be correct, but if we know that a
page is not mapped or not cow-ed, we can remove them from dump file.  The
dump would still be self-consistent, though significantly smaller in size
(up to 10 times smaller on real apps).

Andrew noticed, that the proc pagemap file solved 2 of 3 above issues --
it reports whether a page is present or swapped and it doesn't report not
mapped page cache pages.  But, it doesn't distinguish cow-ed file pages
from not cow-ed.

I would like to make the last unused bit in this file to report whether the
page mapped into respective pte is PageAnon or not.

[comment stolen from Pavel Emelyanov's v1 patch]

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Matt Mackall <mpm@selenic.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-31 17:49:29 -07:00
..
.gitignore Documentation/vm/.gitignore: add page-types 2009-09-24 07:20:57 -07:00
00-INDEX slub: doc: update the slabinfo.c file path 2011-08-31 20:10:17 +03:00
active_mm.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
balance page allocator: use allocation flags as an index to the zone watermark 2009-06-16 19:47:35 -07:00
cleancache.txt Cleanups: rename of flush to invalidate, moving reporting of statistics 2012-03-22 19:52:47 -07:00
highmem.txt mm: highmem documentation 2010-10-26 16:52:08 -07:00
hugetlbpage.txt Fix common misspellings 2011-03-31 11:26:23 -03:00
hwpoison.txt Documentation: update cgroupfs mount point 2011-06-15 21:52:50 -07:00
ksm.txt ksm: remove unswappable max_kernel_pages 2009-12-15 08:53:20 -08:00
locking mm: Convert i_mmap_lock to a mutex 2011-05-25 08:39:18 -07:00
numa doc: fix broken references 2011-09-27 18:08:04 +02:00
numa_memory_policy.txt Doc: Fix typo s/packages/packaged 2010-09-21 17:03:27 +02:00
overcommit-accounting Fix common misspellings 2011-03-31 11:26:23 -03:00
page_migration trivial: fix where cgroup documentation is not correctly referred to 2009-03-30 15:22:02 +02:00
pagemap.txt proc: report file/anon bit in /proc/pid/pagemap 2012-05-31 17:49:29 -07:00
slub.txt slub: document setting min order with debug_guardpage_minorder > 0 2012-01-12 20:13:04 -08:00
transhuge.txt mm: document the meminfo and vmstat fields of relevance to transparent hugepages 2012-05-29 16:22:23 -07:00
unevictable-lru.txt Documentation: Fix multiple typo in Documentation 2012-03-07 16:08:24 +01:00