kernel-ark/Documentation/vm
Tang Chen 8f28ed92d9 Documentation/vm/numa_memory_policy.txt: fix wrong document in numa_memory_policy.txt
In document numa_memory_policy.txt, the following examples for flag
MPOL_F_RELATIVE_NODES are incorrect.

	For example, consider a task that is attached to a cpuset with
	mems 2-5 that sets an Interleave policy over the same set with
	MPOL_F_RELATIVE_NODES.  If the cpuset's mems change to 3-7, the
	interleave now occurs over nodes 3,5-6.  If the cpuset's mems
	then change to 0,2-3,5, then the interleave occurs over nodes
	0,3,5.

According to the comment of the patch adding flag MPOL_F_RELATIVE_NODES,
the nodemasks the user specifies should be considered relative to the
current task's mems_allowed.

 (https://lkml.org/lkml/2008/2/29/428)

And according to numa_memory_policy.txt, if the user's nodemask includes
nodes that are outside the range of the new set of allowed nodes, then
the remap wraps around to the beginning of the nodemask and, if not
already set, sets the node in the mempolicy nodemask.

So in the example, if the user specifies 2-5, for a task whose
mems_allowed is 3-7, the nodemasks should be remapped the third, fourth,
fifth, sixth node in mems_allowed.  like the following:

	mems_allowed:       3  4  5  6  7

	relative index:     0  1  2  3  4
	                    5

So the nodemasks should be remapped to 3,5-7, but not 3,5-6.

And for a task whose mems_allowed is 0,2-3,5, the nodemasks should be
remapped to 0,2-3,5, but not 0,3,5.

	mems_allowed:       0  2  3  5

        relative index:     0  1  2  3
                            4  5

Signed-off-by: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2014-04-18 16:40:08 -07:00
..
.gitignore
00-INDEX Documentation/: update 00-INDEX files 2014-02-10 16:01:40 -08:00
active_mm.txt
balance
cleancache.txt
frontswap.txt
highmem.txt
hugetlbpage.txt hugepage: mention libhugetlbfs in doc 2013-09-11 15:57:39 -07:00
hwpoison.txt
ksm.txt
numa
numa_memory_policy.txt Documentation/vm/numa_memory_policy.txt: fix wrong document in numa_memory_policy.txt 2014-04-18 16:40:08 -07:00
overcommit-accounting mm: add overcommit_kbytes sysctl variable 2014-01-21 16:19:44 -08:00
page_migration
pagemap.txt
slub.txt
soft-dirty.txt mm: track vma changes with VM_SOFTDIRTY bit 2013-09-11 15:57:56 -07:00
split_page_table_lock x86, mm: do not leak page->ptl for pmd page tables 2013-11-21 16:42:28 -08:00
transhuge.txt mm/thp: fix doc for transparent huge zero page 2013-07-09 10:33:23 -07:00
unevictable-lru.txt doc: fix double words 2014-03-21 13:16:58 +01:00
zswap.txt Documentation/vm/zswap.txt: fix typos 2013-11-13 12:09:05 +09:00