[patch] Reset the high water marks in CPUs pcp list

Seth, Rohit
2005-09-28T17:50:09Z

Recent changes in page allocations for pcps has increased the high watermark for these lists. This has resulted in scenarios where pcp lists could be having bigger number of free pages even under low memory conditions.

[PATCH]: Reduce the high mark in cpu's pcp lists.

Signed-off-by: Rohit Seth <rohit.seth@intel.com>

--- linux-2.6.14-rc2-mm1.org/mm/page_alloc.c 2005-09-27 10:03:51.000000000 -0700
+++ linux-2.6.14-rc2-mm1/mm/page_alloc.c 2005-09-27 18:01:21.000000000 -0700
@@ -1859,15 +1859,15 @@
pcp = &p->pcp[0]; /* hot */
pcp->count = 0;
pcp->low = 0;
- pcp->high = 6 * batch;
+ pcp->high = 4 * batch;
pcp->batch = max(1UL, 1 * batch);
INIT_LIST_HEAD(&pcp->list);

pcp = &p->pcp[1]; /* cold*/
pcp->count = 0;
pcp->low = 0;
- pcp->high = 2 * batch;
pcp->batch = max(1UL, batch/2);
+ pcp->high = pcp->batch + 1;
INIT_LIST_HEAD(&pcp->list);
}