Re: [PATCH] mm: stop recalculating min_free_kbytes once set by userspace

From: Andrew Morton

Date: Wed Oct 14 2026 - 17:48:46 EST


On Wed, 14 Oct 2026 17:08:59 +0300 Nimrod Oren <noren@xxxxxxxxxx> wrote:

> min_free_kbytes is recalculated on memory hotplug and on THP sysfs
> writes. The new value comes from calculate_min_free_kbytes() or, while
> THP is enabled, from set_recommended_min_free_kbytes(). A value written
> to the vm.min_free_kbytes sysctl is replaced whenever the new value is
> higher, so a lower value does not stick. This matters most when THP is
> enabled on configurations with large pageblocks, where the new value
> can be excessive [1].
>
> Stop recalculating min_free_kbytes once a value has been written to the
> sysctl. Systems where the sysctl is never written keep the current
> behavior.

This problem lies somewhere in the range of "minor annoyance" to
"catastrophically horrible", but it isn't clear where in that range it
falls.

So can we please can we have a paragraph which explains the real-world
userspace-visible runtime effects of this problem?