aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@shadowen.org>2006-02-01 06:05:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-01 11:53:14 -0500
commit79046ae07ae21245520ca0aab985ee6678a879f8 (patch)
tree8a980747ab9eeaa3407e2aa2366a4c6e95dee9d0
parent42c722d4cb4022e56ff200f3f5a58c0dfd7edac6 (diff)
[PATCH] GFP_ZONETYPES: add commentry on how to calculate
GFP_ZONETYPES define using GFP_ZONEMASK and add commentry Add commentry explaining the optimisation that we can apply to GFP_ZONETYPES when the leftmost bit is a 'loaner', it can only be set in isolation. Signed-off-by: Andy Whitcroft <apw@shadowen.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--include/linux/mmzone.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 93a849f742db..88c30f844abf 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -91,6 +91,14 @@ struct per_cpu_pageset {
91 * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible 91 * be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible
92 * combinations of zone modifiers in "zone modifier space". 92 * combinations of zone modifiers in "zone modifier space".
93 * 93 *
94 * As an optimisation any zone modifier bits which are only valid when
95 * no other zone modifier bits are set (loners) should be placed in
96 * the highest order bits of this field. This allows us to reduce the
97 * extent of the zonelists thus saving space. For example in the case
98 * of three zone modifier bits, we could require up to eight zonelists.
99 * If the left most zone modifier is a "loner" then the highest valid
100 * zonelist would be four allowing us to allocate only five zonelists.
101 *
94 * NOTE! Make sure this matches the zones in <linux/gfp.h> 102 * NOTE! Make sure this matches the zones in <linux/gfp.h>
95 */ 103 */
96#define GFP_ZONEMASK 0x07 104#define GFP_ZONEMASK 0x07