android_kernel_xiaomi_sm8350/include
Christoph Lameter 6e21c8f145 [PATCH] /proc/<pid>/numa_maps to show on which nodes pages reside
This patch was recently discussed on linux-mm:
http://marc.theaimsgroup.com/?t=112085728500002&r=1&w=2

I inherited a large code base from Ray for page migration.  There was a
small patch in there that I find to be very useful since it allows the
display of the locality of the pages in use by a process.  I reworked that
patch and came up with a /proc/<pid>/numa_maps that gives more information
about the vma's of a process.  numa_maps is indexes by the start address
found in /proc/<pid>/maps.  F.e.  with this patch you can see the page use
of the "getty" process:

margin:/proc/12008 # cat maps
00000000-00004000 r--p 00000000 00:00 0
2000000000000000-200000000002c000 r-xp 00000000 08:04 516                /lib/ld-2.3.3.so
2000000000038000-2000000000040000 rw-p 00028000 08:04 516                /lib/ld-2.3.3.so
2000000000040000-2000000000044000 rw-p 2000000000040000 00:00 0
2000000000058000-2000000000260000 r-xp 00000000 08:04 54707842           /lib/tls/libc.so.6.1
2000000000260000-2000000000268000 ---p 00208000 08:04 54707842           /lib/tls/libc.so.6.1
2000000000268000-2000000000274000 rw-p 00200000 08:04 54707842           /lib/tls/libc.so.6.1
2000000000274000-2000000000280000 rw-p 2000000000274000 00:00 0
2000000000280000-20000000002b4000 r--p 00000000 08:04 9126923            /usr/lib/locale/en_US.utf8/LC_CTYPE
2000000000300000-2000000000308000 r--s 00000000 08:04 60071467           /usr/lib/gconv/gconv-modules.cache
2000000000318000-2000000000328000 rw-p 2000000000318000 00:00 0
4000000000000000-4000000000008000 r-xp 00000000 08:04 29576399           /sbin/mingetty
6000000000004000-6000000000008000 rw-p 00004000 08:04 29576399           /sbin/mingetty
6000000000008000-600000000002c000 rw-p 6000000000008000 00:00 0          [heap]
60000fff7fffc000-60000fff80000000 rw-p 60000fff7fffc000 00:00 0
60000ffffff44000-60000ffffff98000 rw-p 60000ffffff44000 00:00 0          [stack]
a000000000000000-a000000000020000 ---p 00000000 00:00 0                  [vdso]

cat numa_maps
2000000000000000 default MaxRef=43 Pages=11 Mapped=11 N0=4 N1=3 N2=2 N3=2
2000000000038000 default MaxRef=1 Pages=2 Mapped=2 Anon=2 N0=2
2000000000040000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
2000000000058000 default MaxRef=43 Pages=61 Mapped=61 N0=14 N1=15 N2=16 N3=16
2000000000268000 default MaxRef=1 Pages=2 Mapped=2 Anon=2 N0=2
2000000000274000 default MaxRef=1 Pages=3 Mapped=3 Anon=3 N0=3
2000000000280000 default MaxRef=8 Pages=3 Mapped=3 N0=3
2000000000300000 default MaxRef=8 Pages=2 Mapped=2 N0=2
2000000000318000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N2=1
4000000000000000 default MaxRef=6 Pages=2 Mapped=2 N1=2
6000000000004000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
6000000000008000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
60000fff7fffc000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1
60000ffffff44000 default MaxRef=1 Pages=1 Mapped=1 Anon=1 N0=1

getty uses ld.so.  The first vma is the code segment which is used by 43
other processes and the pages are evenly distributed over the 4 nodes.

The second vma is the process specific data portion for ld.so.  This is
only one page.

The display format is:

<startaddress>	 Links to information in /proc/<pid>/map
<memory policy>  This can be "default" "interleave={}", "prefer=<node>" or "bind={<zones>}"
MaxRef=		<maximum reference to a page in this vma>
Pages=		<Nr of pages in use>
Mapped=		<Nr of pages with mapcount >
Anon=		<nr of anonymous pages>
Nx=		<Nr of pages on Node x>

The content of the proc-file is self-evident.  If this would be tied into
the sparsemem system then the contents of this file would not be too
useful.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-05 00:05:43 -07:00
..
acpi
asm-alpha [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-arm [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-arm26 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-cris [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-frv [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-generic [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-h8300 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-i386 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-ia64 [IA64] Low byte of current->personality is not a bitmask. 2005-08-30 14:59:24 -07:00
asm-m32r [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-m68k [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-m68knommu [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-mips [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-parisc [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-powerpc [PATCH] Move all the very similar files to asm-powerpc 2005-08-30 13:32:06 +10:00
asm-ppc Merge HEAD from master.kernel.org:/pub/scm/linux/kernel/git/paulus/ppc64-2.6 2005-08-29 21:44:33 -07:00
asm-ppc64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-s390 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sh [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sh64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sparc [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-sparc64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-um [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-v850 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-x86_64 [PATCH] mm: consolidate get_order 2005-09-05 00:05:39 -07:00
asm-xtensa
linux [PATCH] /proc/<pid>/numa_maps to show on which nodes pages reside 2005-09-05 00:05:43 -07:00
math-emu
media
mtd
net /spare/repo/netdev-2.6 branch 'master' 2005-09-01 18:02:01 -04:00
pcmcia
rdma
rxrpc
scsi
sound [ALSA] version 1.0.10rc1 2005-08-30 08:48:35 +02:00
video