diff options
author | Han Pingtian <hanpt@linux.vnet.ibm.com> | 2014-01-23 18:53:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:36:52 -0500 |
commit | 42aa83cb6757800f4e2b499f5db3127761517a6a (patch) | |
tree | e946c566be52d21de5e9254674acc341c39fa475 /mm/huge_memory.c | |
parent | ac13c4622bda2a9ff8f57bbbfeff48b2a42d0963 (diff) |
mm: show message when updating min_free_kbytes in thp
min_free_kbytes may be raised during THP's initialization. Sometimes,
this will change the value which was set by the user. Showing this
message will clarify this confusion.
Only show this message when changing a value which was set by the user
according to Michal Hocko's suggestion.
Show the old value of min_free_kbytes according to Dave Hansen's
suggestion. This will give user the chance to restore old value of
min_free_kbytes.
Signed-off-by: Han Pingtian <hanpt@linux.vnet.ibm.com>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/huge_memory.c')
-rw-r--r-- | mm/huge_memory.c | 8 |
1 files changed, 7 insertions, 1 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 | } |