summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDave Jones <davej@codemonkey.org.uk>2003-05-14 06:45:28 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-05-14 06:45:28 -0700
commitdd4a39287ab6a7529e694fedd358201040e3ef27 (patch)
treec306179ec430ee14f41a8f900ab7bd033fbc4446 /include/linux
parentfb697abe9dabdef5166a55147ff797f72a312e25 (diff)
[PATCH] shrink zonelists.
Originally from Matt Dobson. I've been running with this for a while in -dj, with no noticable side-effects. Matt: node_zonelists looks like it should really be declared of size MAX_NR_ZONES, not GFP_ZONEMASK. GFP_ZONEMASK is currently 15, making node_zonelists an array of 16 elements. The extra zonelists are all just duplicates of the *real* zonelists, namely the first 3 entries. Again, if anyone can explain to me why I'm wrong in my thinking, I'd love to know. There's certainly no way you could bitwise-and something with any combination of the GFP_DMA and GFP_HIGHMEM flags to refer to the 12th zonelist or some such! Or am I crazy?
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/mmzone.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 8db7ca4df8f2..2a80a0c3fe2f 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -146,6 +146,7 @@ struct zone {
#define ZONE_NORMAL 1
#define ZONE_HIGHMEM 2
#define MAX_NR_ZONES 3
+#define GFP_ZONEMASK 0x03
/*
* One allocation request operates on a zonelist. A zonelist
@@ -162,7 +163,6 @@ struct zonelist {
struct zone *zones[MAX_NUMNODES * MAX_NR_ZONES + 1]; // NULL delimited
};
-#define GFP_ZONEMASK 0x0f
/*
* The pg_data_t structure is used in machines with CONFIG_DISCONTIGMEM
@@ -178,7 +178,7 @@ struct zonelist {
struct bootmem_data;
typedef struct pglist_data {
struct zone node_zones[MAX_NR_ZONES];
- struct zonelist node_zonelists[GFP_ZONEMASK+1];
+ struct zonelist node_zonelists[MAX_NR_ZONES];
int nr_zones;
struct page *node_mem_map;
unsigned long *valid_addr_bitmap;