summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@digeo.com>2002-10-04 20:34:45 -0700
committerRussell King <rmk@flint.arm.linux.org.uk>2002-10-04 20:34:45 -0700
commitd39755802e430876d612bc792e4c29652ed8b99b (patch)
treeba4b3c34d50324f18761c54f68debb1b73fbab14 /include
parent9d66d9e91730e97f653c3143b637f1d63605f074 (diff)
[PATCH] distinguish between address span of a zone and the number
From David Mosberger The patch below fixes a bug in nr_free_zone_pages() which shows when a zone has hole. The problem is due to the fact that "struct zone" didn't keep track of the amount of real memory in a zone. Because of this, nr_free_zone_pages() simply assumed that a zone consists entirely of real memory. On machines with large holes, this has catastrophic effects on VM performance, because the VM system ends up thinking that there is plenty of memory left over in a zone, when in fact it may be completely full. The patch below fixes the problem by replacing the "size" member in "struct zone" with "spanned_pages" and "present_pages" and updating page_alloc.c.
Diffstat (limited to 'include')
-rw-r--r--include/linux/mmzone.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index d7d12a69f505..dab0f76cfb20 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -120,7 +120,8 @@ struct zone {
* rarely used fields:
*/
char *name;
- unsigned long size;
+ unsigned long spanned_pages; /* total size, including holes */
+ unsigned long present_pages; /* amount of memory (excluding holes) */
} ____cacheline_maxaligned_in_smp;
#define ZONE_DMA 0