aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/page_alloc.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 116c087f76bb..8be37bcda0b2 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5020,14 +5020,7 @@ static void setup_per_zone_lowmem_reserve(void)
5020 calculate_totalreserve_pages(); 5020 calculate_totalreserve_pages();
5021} 5021}
5022 5022
5023/** 5023static void __setup_per_zone_wmarks(void)
5024 * setup_per_zone_wmarks - called when min_free_kbytes changes
5025 * or when memory is hot-{added|removed}
5026 *
5027 * Ensures that the watermark[min,low,high] values for each zone are set
5028 * correctly with respect to min_free_kbytes.
5029 */
5030void setup_per_zone_wmarks(void)
5031{ 5024{
5032 unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10); 5025 unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
5033 unsigned long lowmem_pages = 0; 5026 unsigned long lowmem_pages = 0;
@@ -5082,6 +5075,20 @@ void setup_per_zone_wmarks(void)
5082 calculate_totalreserve_pages(); 5075 calculate_totalreserve_pages();
5083} 5076}
5084 5077
5078/**
5079 * setup_per_zone_wmarks - called when min_free_kbytes changes
5080 * or when memory is hot-{added|removed}
5081 *
5082 * Ensures that the watermark[min,low,high] values for each zone are set
5083 * correctly with respect to min_free_kbytes.
5084 */
5085void setup_per_zone_wmarks(void)
5086{
5087 mutex_lock(&zonelists_mutex);
5088 __setup_per_zone_wmarks();
5089 mutex_unlock(&zonelists_mutex);
5090}
5091
5085/* 5092/*
5086 * The inactive anon list should be small enough that the VM never has to 5093 * The inactive anon list should be small enough that the VM never has to
5087 * do too much work, but large enough that each inactive page has a chance 5094 * do too much work, but large enough that each inactive page has a chance