Documentation/admin-guide/sysctl/vm.rst | 2 ++ 1 file changed, 2 insertions(+)
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>
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
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
© 2016 - 2026 Red Hat, Inc.