diff options
author | Christoph Lameter <clameter@sgi.com> | 2006-03-14 22:50:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-15 00:43:02 -0500 |
commit | b4fb376628e63bfc8071fc915b921da3db4a3385 (patch) | |
tree | 01863773f7d48792072b2a49aba9fa78df39eecc /Documentation/cpusets.txt | |
parent | 4983da07f1e2e8dc81cb9d640fbf35b899cdbdf2 (diff) |
[PATCH] Page migration documentation update
Update the documentation for page migration.
- Fix up bits and pieces in cpusets.txt
- Rework text in vm/page-migration to be clearer and reflect the final
version of page migration in 2.6.16. Mention Andi Kleen's numactl
package that contains user space tools for page migration via
libnuma. Add reference to numa_maps and to the manpage in numactl.
- Add todo list for outstanding issues
Signed-off-by: Christoph Lameter <clameter@sgi.com>
Acked-by: Paul Jackson <pj@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/cpusets.txt')
-rw-r--r-- | Documentation/cpusets.txt | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/Documentation/cpusets.txt b/Documentation/cpusets.txt index 990998ee10b6..30c41459953c 100644 --- a/Documentation/cpusets.txt +++ b/Documentation/cpusets.txt | |||
@@ -4,8 +4,9 @@ | |||
4 | Copyright (C) 2004 BULL SA. | 4 | Copyright (C) 2004 BULL SA. |
5 | Written by Simon.Derr@bull.net | 5 | Written by Simon.Derr@bull.net |
6 | 6 | ||
7 | Portions Copyright (c) 2004 Silicon Graphics, Inc. | 7 | Portions Copyright (c) 2004-2006 Silicon Graphics, Inc. |
8 | Modified by Paul Jackson <pj@sgi.com> | 8 | Modified by Paul Jackson <pj@sgi.com> |
9 | Modified by Christoph Lameter <clameter@sgi.com> | ||
9 | 10 | ||
10 | CONTENTS: | 11 | CONTENTS: |
11 | ========= | 12 | ========= |
@@ -90,7 +91,8 @@ This can be especially valuable on: | |||
90 | 91 | ||
91 | These subsets, or "soft partitions" must be able to be dynamically | 92 | These subsets, or "soft partitions" must be able to be dynamically |
92 | adjusted, as the job mix changes, without impacting other concurrently | 93 | adjusted, as the job mix changes, without impacting other concurrently |
93 | executing jobs. | 94 | executing jobs. The location of the running jobs pages may also be moved |
95 | when the memory locations are changed. | ||
94 | 96 | ||
95 | The kernel cpuset patch provides the minimum essential kernel | 97 | The kernel cpuset patch provides the minimum essential kernel |
96 | mechanisms required to efficiently implement such subsets. It | 98 | mechanisms required to efficiently implement such subsets. It |
@@ -102,8 +104,8 @@ memory allocator code. | |||
102 | 1.3 How are cpusets implemented ? | 104 | 1.3 How are cpusets implemented ? |
103 | --------------------------------- | 105 | --------------------------------- |
104 | 106 | ||
105 | Cpusets provide a Linux kernel (2.6.7 and above) mechanism to constrain | 107 | Cpusets provide a Linux kernel mechanism to constrain which CPUs and |
106 | which CPUs and Memory Nodes are used by a process or set of processes. | 108 | Memory Nodes are used by a process or set of processes. |
107 | 109 | ||
108 | The Linux kernel already has a pair of mechanisms to specify on which | 110 | The Linux kernel already has a pair of mechanisms to specify on which |
109 | CPUs a task may be scheduled (sched_setaffinity) and on which Memory | 111 | CPUs a task may be scheduled (sched_setaffinity) and on which Memory |
@@ -371,22 +373,17 @@ cpusets memory placement policy 'mems' subsequently changes. | |||
371 | If the cpuset flag file 'memory_migrate' is set true, then when | 373 | If the cpuset flag file 'memory_migrate' is set true, then when |
372 | tasks are attached to that cpuset, any pages that task had | 374 | tasks are attached to that cpuset, any pages that task had |
373 | allocated to it on nodes in its previous cpuset are migrated | 375 | allocated to it on nodes in its previous cpuset are migrated |
374 | to the tasks new cpuset. Depending on the implementation, | 376 | to the tasks new cpuset. The relative placement of the page within |
375 | this migration may either be done by swapping the page out, | 377 | the cpuset is preserved during these migration operations if possible. |
376 | so that the next time the page is referenced, it will be paged | 378 | For example if the page was on the second valid node of the prior cpuset |
377 | into the tasks new cpuset, usually on the node where it was | 379 | then the page will be placed on the second valid node of the new cpuset. |
378 | referenced, or this migration may be done by directly copying | 380 | |
379 | the pages from the tasks previous cpuset to the new cpuset, | ||
380 | where possible to the same node, relative to the new cpuset, | ||
381 | as the node that held the page, relative to the old cpuset. | ||
382 | Also if 'memory_migrate' is set true, then if that cpusets | 381 | Also if 'memory_migrate' is set true, then if that cpusets |
383 | 'mems' file is modified, pages allocated to tasks in that | 382 | 'mems' file is modified, pages allocated to tasks in that |
384 | cpuset, that were on nodes in the previous setting of 'mems', | 383 | cpuset, that were on nodes in the previous setting of 'mems', |
385 | will be moved to nodes in the new setting of 'mems.' Again, | 384 | will be moved to nodes in the new setting of 'mems.' |
386 | depending on the implementation, this might be done by swapping, | 385 | Pages that were not in the tasks prior cpuset, or in the cpusets |
387 | or by direct copying. In either case, pages that were not in | 386 | prior 'mems' setting, will not be moved. |
388 | the tasks prior cpuset, or in the cpusets prior 'mems' setting, | ||
389 | will not be moved. | ||
390 | 387 | ||
391 | There is an exception to the above. If hotplug functionality is used | 388 | There is an exception to the above. If hotplug functionality is used |
392 | to remove all the CPUs that are currently assigned to a cpuset, | 389 | to remove all the CPUs that are currently assigned to a cpuset, |
@@ -434,16 +431,6 @@ and then start a subshell 'sh' in that cpuset: | |||
434 | # The next line should display '/Charlie' | 431 | # The next line should display '/Charlie' |
435 | cat /proc/self/cpuset | 432 | cat /proc/self/cpuset |
436 | 433 | ||
437 | In the case that a change of cpuset includes wanting to move already | ||
438 | allocated memory pages, consider further the work of IWAMOTO | ||
439 | Toshihiro <iwamoto@valinux.co.jp> for page remapping and memory | ||
440 | hotremoval, which can be found at: | ||
441 | |||
442 | http://people.valinux.co.jp/~iwamoto/mh.html | ||
443 | |||
444 | The integration of cpusets with such memory migration is not yet | ||
445 | available. | ||
446 | |||
447 | In the future, a C library interface to cpusets will likely be | 434 | In the future, a C library interface to cpusets will likely be |
448 | available. For now, the only way to query or modify cpusets is | 435 | available. For now, the only way to query or modify cpusets is |
449 | via the cpuset file system, using the various cd, mkdir, echo, cat, | 436 | via the cpuset file system, using the various cd, mkdir, echo, cat, |