Skip to content

Commit b58e9b5

Browse files
theyoyojoSomasundaram Krishnasamy
authored andcommitted
mm/page_alloc: increase default min_free_kbytes bound
Currently, the vm.min_free_kbytes sysctl value is capped at a hardcoded 64M in init_per_zone_wmark_min (unless it is overridden by khugepaged initialization). This value has not been modified since 2005, and enterprise-grade systems now frequently have hundreds of GB of RAM and multiple 10, 40, or even 100 GB NICs. We have seen page allocation failures on heavily loaded systems related to NIC drivers. These issues were resolved by an increase to vm.min_free_kbytes. This patch increases the hardcoded value by a factor of 4 as a temporary solution. Further work to make the calculation of vm.min_free_kbytes more consistent throughout the kernel would be desirable. As an example of the inconsistency of the current method, this value is recalculated by init_per_zone_wmark_min() in the case of memory hotplug which will override the value set by set_recommended_min_free_kbytes() called during khugepaged initialization even if khugepaged remains enabled, however an on/off toggle of khugepaged will then recalculate and set the value via set_recommended_min_free_kbytes(). Signed-off-by: Joel Savitz <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Andrew Morton <[email protected]> Cc: Rafael Aquini <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]> Backported from upstream commit ee8eb9a ("mm/page_alloc: increase default min_free_kbytes bound ") Orabug: 31735858 Signed-off-by: Khalid Aziz <[email protected]> Reviewed-by: Jack Vogel <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent caa99f2 commit b58e9b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/page_alloc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7146,8 +7146,8 @@ int __meminit init_per_zone_wmark_min(void)
71467146
min_free_kbytes = new_min_free_kbytes;
71477147
if (min_free_kbytes < 128)
71487148
min_free_kbytes = 128;
7149-
if (min_free_kbytes > 65536)
7150-
min_free_kbytes = 65536;
7149+
if (min_free_kbytes > 262144)
7150+
min_free_kbytes = 262144;
71517151
} else {
71527152
pr_warn("min_free_kbytes is not updated to %d because user defined value %d is preferred\n",
71537153
new_min_free_kbytes, user_min_free_kbytes);

0 commit comments

Comments
 (0)