aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLee Schermerhorn <lee.schermerhorn@hp.com>2008-04-28 05:13:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 11:58:24 -0400
commitfc36b8d3d819047eb4d23ca079fb4d3af20ff076 (patch)
tree65ee215a6bdca1e8d4ac4b57525445d7d1829c1d /Documentation
parent53f2556b6792ed99fde965f5e061749edd455623 (diff)
mempolicy: use MPOL_F_LOCAL to Indicate Preferred Local Policy
Now that we're using "preferred local" policy for system default, we need to make this as fast as possible. Because of the variable size of the mempolicy structure [based on size of nodemasks], the preferred_node may be in a different cacheline from the mode. This can result in accessing an extra cacheline in the normal case of system default policy. Suspect this is the cause of an observed 2-3% slowdown in page fault testing relative to kernel without this patch series. To alleviate this, use an internal mode flag, MPOL_F_LOCAL in the mempolicy flags member which is guaranteed [?] to be in the same cacheline as the mode itself. Verified that reworked mempolicy now performs slightly better on 25-rc8-mm1 for both anon and shmem segments with system default and vma [preferred local] policy. Signed-off-by: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Christoph Lameter <clameter@sgi.com> Cc: David Rientjes <rientjes@google.com> Cc: Mel Gorman <mel@csn.ul.ie> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/vm/numa_memory_policy.txt11
1 files changed, 5 insertions, 6 deletions
diff --git a/Documentation/vm/numa_memory_policy.txt b/Documentation/vm/numa_memory_policy.txt
index 13cca5a3cf17..bad16d3f6a47 100644
--- a/Documentation/vm/numa_memory_policy.txt
+++ b/Documentation/vm/numa_memory_policy.txt
@@ -176,12 +176,11 @@ Components of Memory Policies
176 containing the cpu where the allocation takes place. 176 containing the cpu where the allocation takes place.
177 177
178 Internally, the Preferred policy uses a single node--the 178 Internally, the Preferred policy uses a single node--the
179 preferred_node member of struct mempolicy. A "distinguished 179 preferred_node member of struct mempolicy. When the internal
180 value of this preferred_node, currently '-1', is interpreted 180 mode flag MPOL_F_LOCAL is set, the preferred_node is ignored and
181 as "the node containing the cpu where the allocation takes 181 the policy is interpreted as local allocation. "Local" allocation
182 place"--local allocation. "Local" allocation policy can be 182 policy can be viewed as a Preferred policy that starts at the node
183 viewed as a Preferred policy that starts at the node containing 183 containing the cpu where the allocation takes place.
184 the cpu where the allocation takes place.
185 184
186 It is possible for the user to specify that local allocation is 185 It is possible for the user to specify that local allocation is
187 always preferred by passing an empty nodemask with this mode. 186 always preferred by passing an empty nodemask with this mode.