summaryrefslogtreecommitdiff
path: root/include/linux/mmzone.h
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2006-02-09 09:29:00 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2006-02-09 09:29:00 (GMT)
commit9caafa6c8686e319cf4d5f3757b3972c6c522b7c (patch)
treeb38979b835b5d22e681b175d0b98a3c7560d9c59 /include/linux/mmzone.h
parent51e9f2ff83df6b1c81c5c44f4486c68ed87aa20e (diff)
parentcac0e8e8bb2e7a086643bdd00c41d900a79bb4fa (diff)
downloadlinux-fsl-qoriq-9caafa6c8686e319cf4d5f3757b3972c6c522b7c.tar.xz
Merge branch 'upstream-fixes'
Diffstat (limited to 'include/linux/mmzone.h')
-rw-r--r--include/linux/mmzone.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 93a849f..ebfc238 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -91,10 +91,21 @@ struct per_cpu_pageset {
* be 8 (2 ** 3) zonelists. GFP_ZONETYPES defines the number of possible
* combinations of zone modifiers in "zone modifier space".
*
+ * As an optimisation any zone modifier bits which are only valid when
+ * no other zone modifier bits are set (loners) should be placed in
+ * the highest order bits of this field. This allows us to reduce the
+ * extent of the zonelists thus saving space. For example in the case
+ * of three zone modifier bits, we could require up to eight zonelists.
+ * If the left most zone modifier is a "loner" then the highest valid
+ * zonelist would be four allowing us to allocate only five zonelists.
+ * Use the first form for GFP_ZONETYPES when the left most bit is not
+ * a "loner", otherwise use the second.
+ *
* NOTE! Make sure this matches the zones in <linux/gfp.h>
*/
#define GFP_ZONEMASK 0x07
-#define GFP_ZONETYPES 5
+/* #define GFP_ZONETYPES (GFP_ZONEMASK + 1) */ /* Non-loner */
+#define GFP_ZONETYPES ((GFP_ZONEMASK + 1) / 2 + 1) /* Loner */
/*
* On machines where it is needed (eg PCs) we divide physical memory