OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man7 / numa.7
1 .\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\" and Copyright 2003,2004 Andi Kleen, SuSE Labs.
4 .\" numa_maps material Copyright (c) 2005 Silicon Graphics Incorporated.
5 .\"     Christoph Lameter, <cl@linux-foundation.org>.
6 .\"
7 .\" %%%LICENSE_START(VERBATIM)
8 .\" Permission is granted to make and distribute verbatim copies of this
9 .\" manual provided the copyright notice and this permission notice are
10 .\" preserved on all copies.
11 .\"
12 .\" Permission is granted to copy and distribute modified versions of this
13 .\" manual under the conditions for verbatim copying, provided that the
14 .\" entire resulting derived work is distributed under the terms of a
15 .\" permission notice identical to this one.
16 .\"
17 .\" Since the Linux kernel and libraries are constantly changing, this
18 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
19 .\" responsibility for errors or omissions, or for damages resulting from
20 .\" the use of the information contained herein.  The author(s) may not
21 .\" have taken the same level of care in the production of this manual,
22 .\" which is licensed free of charge, as they might when working
23 .\" professionally.
24 .\"
25 .\" Formatted or processed versions of this manual, if unaccompanied by
26 .\" the source, must acknowledge the copyright and authors of this work.
27 .\" %%%LICENSE_END
28 .\"
29 .TH NUMA 7 2012-08-05 "Linux" "Linux Programmer's Manual"
30 .SH NAME
31 numa \- overview of Non-Uniform Memory Architecture
32 .SH DESCRIPTION
33 Non-Uniform Memory Access (NUMA) refers to multiprocessor systems
34 whose memory is divided into multiple memory nodes.
35 The access time of a memory node depends on
36 the relative locations of the accessing CPU and the accessed node.
37 (This contrasts with a symmetric multiprocessor system,
38 where the access time for all of the memory is the same for all CPUs.)
39 Normally, each CPU on a NUMA system has a local memory node whose
40 contents can be accessed faster than the memory in
41 the node local to another CPU
42 or the memory on a bus shared by all CPUs.
43 .SS NUMA system calls
44 The Linux kernel implements the following NUMA-related system calls:
45 .BR get_mempolicy (2),
46 .BR mbind (2),
47 .BR migrate_pages (2),
48 .BR move_pages (2),
49 and
50 .BR set_mempolicy (2).
51 However, applications should normally use the interface provided by
52 .IR libnuma ;
53 see "Library Support" below.
54 .SS /proc/[number]/numa_maps  (since Linux 2.6.14)
55 .\" See also Changelog-2.6.14
56 This file displays information about a process's
57 NUMA memory policy and allocation.
58
59 Each line contains information about a memory range used by the process,
60 displaying\(emamong other information\(emthe effective memory policy for
61 that memory range and on which nodes the pages have been allocated.
62
63 .I numa_maps
64 is a read-only file.
65 When
66 .I /proc/<pid>/numa_maps
67 is read, the kernel will scan the virtual address space of the
68 process and report how memory is used.
69 One line is displayed for each unique memory range of the process.
70
71 The first field of each line shows the starting address of the memory range.
72 This field allows a correlation with the contents of the
73 .I /proc/<pid>/maps
74 file,
75 which contains the end address of the range and other information,
76 such as the access permissions and sharing.
77
78 The second field shows the memory policy currently in effect for the
79 memory range.
80 Note that the effective policy is not necessarily the policy
81 installed by the process for that memory range.
82 Specifically, if the process installed a "default" policy for that range,
83 the effective policy for that range will be the process policy,
84 which may or may not be "default".
85
86 The rest of the line contains information about the pages allocated in
87 the memory range, as follows:
88 .TP
89 .I N<node>=<nr_pages>
90 The number of pages allocated on
91 .IR <node> .
92 .I <nr_pages>
93 includes only pages currently mapped by the process.
94 Page migration and memory reclaim may have temporarily unmapped pages
95 associated with this memory range.
96 These pages may show up again only after the process has
97 attempted to reference them.
98 If the memory range represents a shared memory area or file mapping,
99 other processes may currently have additional pages mapped in a
100 corresponding memory range.
101 .TP
102 .I file=<filename>
103 The file backing the memory range.
104 If the file is mapped as private, write accesses may have generated
105 COW (Copy-On-Write) pages in this memory range.
106 These pages are displayed as anonymous pages.
107 .TP
108 .I heap
109 Memory range is used for the heap.
110 .TP
111 .I stack
112 Memory range is used for the stack.
113 .TP
114 .I huge
115 Huge memory range.
116 The page counts shown are huge pages and not regular sized pages.
117 .TP
118 .I anon=<pages>
119 The number of anonymous page in the range.
120 .TP
121 .I dirty=<pages>
122 Number of dirty pages.
123 .TP
124 .I mapped=<pages>
125 Total number of mapped pages, if different from
126 .IR dirty
127 and
128 .I anon
129 pages.
130 .TP
131 .I mapmax=<count>
132 Maximum mapcount (number of processes mapping a single page) encountered
133 during the scan.
134 This may be used as an indicator of the degree of sharing occurring in a
135 given memory range.
136 .TP
137 .I swapcache=<count>
138 Number of pages that have an associated entry on a swap device.
139 .TP
140 .I active=<pages>
141 The number of pages on the active list.
142 This field is shown only if different from the number of pages in this range.
143 This means that some inactive pages exist in the memory range that may be
144 removed from memory by the swapper soon.
145 .TP
146 .I writeback=<pages>
147 Number of pages that are currently being written out to disk.
148 .SH CONFORMING TO
149 No standards govern NUMA interfaces.
150 .SH NOTES
151 The Linux NUMA system calls and
152 .I /proc
153 interface are available only
154 if the kernel was configured and built with the
155 .BR CONFIG_NUMA
156 option.
157 .SS Library support
158 Link with \fI\-lnuma\fP
159 to get the system call definitions.
160 .I libnuma
161 and the required
162 .I <numaif.h>
163 header are available in the
164 .I numactl
165 package.
166
167 However, applications should not use these system calls directly.
168 Instead, the higher level interface provided by the
169 .BR numa (3)
170 functions in the
171 .I numactl
172 package is recommended.
173 The
174 .I numactl
175 package is available at
176 .UR ftp://oss.sgi.com\:/www\:/projects\:/libnuma\:/download/
177 .UE .
178 The package is also included in some Linux distributions.
179 Some distributions include the development library and header
180 in the separate
181 .I numactl-devel
182 package.
183 .SH SEE ALSO
184 .BR get_mempolicy (2),
185 .BR mbind (2),
186 .BR move_pages (2),
187 .BR set_mempolicy (2),
188 .BR numa (3),
189 .BR cpuset (7),
190 .BR numactl (8)
191 .SH COLOPHON
192 This page is part of release 3.79 of the Linux
193 .I man-pages
194 project.
195 A description of the project,
196 information about reporting bugs,
197 and the latest version of this page,
198 can be found at
199 \%http://www.kernel.org/doc/man\-pages/.