diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-01-19 05:11:34 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2004-01-19 05:11:34 -0800 |
| commit | f1933a6dd8c813d5f7482f4fc48dd343003a10de (patch) | |
| tree | 4235ca009b2a40689bff6e1dca06fb5c42ab0f7e | |
| parent | 8e05ea563f2fccdc9faedb483843fbaa82151ecf (diff) | |
[PATCH] vmscan: initialize zone->{prev,temp}_priority
From: Nikita Danilov <Nikita@Namesys.COM>
This patch initializes zone->{prev,temp}_priority to DEF_PRIORITY.
Otherwise they are left zeroed, and first run of VM scanner thinks that
zones are under enormous stress.
| -rw-r--r-- | include/linux/mmzone.h | 7 | ||||
| -rw-r--r-- | mm/page_alloc.c | 2 | ||||
| -rw-r--r-- | mm/vmscan.c | 7 |
3 files changed, 9 insertions, 7 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 9fa4ffb2675c..66cbaa36d878 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -166,6 +166,13 @@ struct zone { #define GFP_ZONEMASK 0x03 /* + * The "priority" of VM scanning is how much of the queues we will scan in one + * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the + * queues ("queue_length >> 12") during an aging round. + */ +#define DEF_PRIORITY 12 + +/* * One allocation request operates on a zonelist. A zonelist * is a list of zones, the first one is the 'goal' of the * allocation, the other zones are fallback zones, in decreasing diff --git a/mm/page_alloc.c b/mm/page_alloc.c index c36a51318004..b2a185f246d4 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1266,6 +1266,8 @@ static void __init free_area_init_core(struct pglist_data *pgdat, zone->zone_pgdat = pgdat; zone->free_pages = 0; + zone->temp_priority = zone->prev_priority = DEF_PRIORITY; + /* * The per-cpu-pages pools are set to around 1000th of the * size of the zone. But no more than 1/4 of a meg - there's diff --git a/mm/vmscan.c b/mm/vmscan.c index bb27edc29afd..dcb7dc0f176d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -38,13 +38,6 @@ #include <linux/swapops.h> /* - * The "priority" of VM scanning is how much of the queues we will scan in one - * go. A value of 12 for DEF_PRIORITY implies that we will scan 1/4096th of the - * queues ("queue_length >> 12") during an aging round. - */ -#define DEF_PRIORITY 12 - -/* * From 0 .. 100. Higher means more swappy. */ int vm_swappiness = 60; |
