diff options
-rw-r--r-- | mm/huge_memory.c | 8 | ||||
-rw-r--r-- | mm/internal.h | 1 | ||||
-rw-r--r-- | mm/page_alloc.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 25fab7150fa0..afe738358370 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c | |||
@@ -130,8 +130,14 @@ static int set_recommended_min_free_kbytes(void) | |||
130 | (unsigned long) nr_free_buffer_pages() / 20); | 130 | (unsigned long) nr_free_buffer_pages() / 20); |
131 | recommended_min <<= (PAGE_SHIFT-10); | 131 | recommended_min <<= (PAGE_SHIFT-10); |
132 | 132 | ||
133 | if (recommended_min > min_free_kbytes) | 133 | if (recommended_min > min_free_kbytes) { |
134 | if (user_min_free_kbytes >= 0) | ||
135 | pr_info("raising min_free_kbytes from %d to %lu " | ||
136 | "to help transparent hugepage allocations\n", | ||
137 | min_free_kbytes, recommended_min); | ||
138 | |||
134 | min_free_kbytes = recommended_min; | 139 | min_free_kbytes = recommended_min; |
140 | } | ||
135 | setup_per_zone_wmarks(); | 141 | setup_per_zone_wmarks(); |
136 | return 0; | 142 | return 0; |
137 | } | 143 | } |
diff --git a/mm/internal.h b/mm/internal.h index dc95e979ae56..7e145e8cd1e6 100644 --- a/mm/internal.h +++ b/mm/internal.h | |||
@@ -99,6 +99,7 @@ extern void prep_compound_page(struct page *page, unsigned long order); | |||
99 | #ifdef CONFIG_MEMORY_FAILURE | 99 | #ifdef CONFIG_MEMORY_FAILURE |
100 | extern bool is_free_buddy_page(struct page *page); | 100 | extern bool is_free_buddy_page(struct page *page); |
101 | #endif | 101 | #endif |
102 | extern int user_min_free_kbytes; | ||
102 | 103 | ||
103 | #if defined CONFIG_COMPACTION || defined CONFIG_CMA | 104 | #if defined CONFIG_COMPACTION || defined CONFIG_CMA |
104 | 105 | ||
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index a818d568ddf3..e3758a09a009 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -205,7 +205,7 @@ static char * const zone_names[MAX_NR_ZONES] = { | |||
205 | }; | 205 | }; |
206 | 206 | ||
207 | int min_free_kbytes = 1024; | 207 | int min_free_kbytes = 1024; |
208 | int user_min_free_kbytes; | 208 | int user_min_free_kbytes = -1; |
209 | 209 | ||
210 | static unsigned long __meminitdata nr_kernel_pages; | 210 | static unsigned long __meminitdata nr_kernel_pages; |
211 | static unsigned long __meminitdata nr_all_pages; | 211 | static unsigned long __meminitdata nr_all_pages; |