]> git.hungrycats.org Git - linux/commitdiff
[PATCH] vmscan: initialize zone->{prev,temp}_priority
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 13:11:34 +0000 (05:11 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 13:11:34 +0000 (05:11 -0800)
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.

include/linux/mmzone.h
mm/page_alloc.c
mm/vmscan.c

index 9fa4ffb2675c8b717d9035784908d448537859bb..66cbaa36d8781d79ec38f4f9433484072276fe11 100644 (file)
@@ -165,6 +165,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
index c36a51318004d3e7cbddc32f07ae47eceb4112ca..b2a185f246d45e3a4e1743ec42a8b6268d00e0a2 100644 (file)
@@ -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
index bb27edc29afdc88b7bd29ee370664e4a787b7417..dcb7dc0f176d16bd8116260da82127898c71092b 100644 (file)
 
 #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.
  */