Re: [PATCH] docs: mm: clarify that user_reserve_kbytes has no effect when overcommit_memory is set to 0 or 1
From: David Hildenbrand (Arm)
Date: Mon Jun 01 2026 - 11:22:59 EST
On 5/28/26 16:02, Brian Masney wrote:
> On Thu, May 28, 2026 at 09:45:10AM -0400, Brian Masney wrote:
>> Looking at __vm_enough_memory() in mm/util.c, user_reserve_kbytes has no
>> effect when overcommit_memory is set to 0 or 1. The documentation for
>> overcommit_memory already references user_reserve_kbytes when the flag
>> is set to 2.
>>
>> Let's go ahead and add a clarification to user_reserve_kbytes in vm.rst
>> that it has no effect when overcommit_memory is set to 0 or 1.
>>
>> Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
>> ---
>> Documentation/admin-guide/sysctl/vm.rst | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/Documentation/admin-guide/sysctl/vm.rst b/Documentation/admin-guide/sysctl/vm.rst
>> index 97e12359775c..b9b0c218bfb4 100644
>> --- a/Documentation/admin-guide/sysctl/vm.rst
>> +++ b/Documentation/admin-guide/sysctl/vm.rst
>> @@ -1034,6 +1034,8 @@ min(3% of current process size, user_reserve_kbytes) of free memory.
>> This is intended to prevent a user from starting a single memory hogging
>> process, such that they cannot recover (kill the hog).
>>
>> +This setting has no effect when overcommit_memory is set to 0 or 1.
Kind-of implied by "When overcommit_memory is set to 2," ... but this makes it
clearer.
Acked-by: David Hildenbrand (Arm) <david@xxxxxxxxxx>
--
Cheers,
David