All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] docs: mm: clarify that user_reserve_kbytes has no effect when overcommit_memory is set to 0 or 1
@ 2026-05-28 13:45 Brian Masney
  2026-05-28 14:02 ` Brian Masney
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Masney @ 2026-05-28 13:45 UTC (permalink / raw)
  To: Jonathan Corbet, Shuah Khan, Andrew Morton
  Cc: linux-mm, linux-doc, linux-kernel, Matthew Storr, Brian Masney

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@redhat.com>
---
 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.
+
 user_reserve_kbytes defaults to min(3% of the current process size, 128MB).
 
 If this is reduced to zero, then the user will be allowed to allocate

---
base-commit: e7d700e14934e68f86338c5610cf2ae76798b663
change-id: 20260528-mm-clarify-docs-76ab8f82826d

Best regards,
-- 
Brian Masney <bmasney@redhat.com>



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: mm: clarify that user_reserve_kbytes has no effect when overcommit_memory is set to 0 or 1
  2026-05-28 13:45 [PATCH] docs: mm: clarify that user_reserve_kbytes has no effect when overcommit_memory is set to 0 or 1 Brian Masney
@ 2026-05-28 14:02 ` Brian Masney
  2026-06-01 15:11   ` David Hildenbrand (Arm)
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Masney @ 2026-05-28 14:02 UTC (permalink / raw)
  To: Jonathan Corbet, Shuah Khan, Andrew Morton, David Hildenbrand,
	Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka
  Cc: linux-mm, linux-doc, linux-kernel, Matthew Storr

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@redhat.com>
> ---
>  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.
> +
>  user_reserve_kbytes defaults to min(3% of the current process size, 128MB).
>  
>  If this is reduced to zero, then the user will be allowed to allocate
> 
> ---
> base-commit: e7d700e14934e68f86338c5610cf2ae76798b663
> change-id: 20260528-mm-clarify-docs-76ab8f82826d

+ Other MM maintainers / reviewers. Sorry for not including on the
initial patch posting. I initially missed the separate MM Core subsystem
in the MAINTAINERS file.

Brian


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] docs: mm: clarify that user_reserve_kbytes has no effect when overcommit_memory is set to 0 or 1
  2026-05-28 14:02 ` Brian Masney
@ 2026-06-01 15:11   ` David Hildenbrand (Arm)
  0 siblings, 0 replies; 3+ messages in thread
From: David Hildenbrand (Arm) @ 2026-06-01 15:11 UTC (permalink / raw)
  To: Brian Masney, Jonathan Corbet, Shuah Khan, Andrew Morton,
	Lorenzo Stoakes, Liam R. Howlett, Vlastimil Babka
  Cc: linux-mm, linux-doc, linux-kernel, Matthew Storr

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@redhat.com>
>> ---
>>  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@kernel.org>

-- 
Cheers,

David

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-01 15:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28 13:45 [PATCH] docs: mm: clarify that user_reserve_kbytes has no effect when overcommit_memory is set to 0 or 1 Brian Masney
2026-05-28 14:02 ` Brian Masney
2026-06-01 15:11   ` David Hildenbrand (Arm)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.