Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Brian Masney <bmasney@redhat.com>
To: Jonathan Corbet <corbet@lwn.net>,
	Shuah Khan <skhan@linuxfoundation.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	Lorenzo Stoakes <ljs@kernel.org>,
	"Liam R. Howlett" <liam@infradead.org>,
	Vlastimil Babka <vbabka@kernel.org>
Cc: linux-mm@kvack.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org, Matthew Storr <mstorr@redhat.com>
Subject: Re: [PATCH] docs: mm: clarify that user_reserve_kbytes has no effect when overcommit_memory is set to 0 or 1
Date: Thu, 28 May 2026 10:02:02 -0400	[thread overview]
Message-ID: <ahhK2nEo-HPgodNF@redhat.com> (raw)
In-Reply-To: <20260528-mm-clarify-docs-v1-1-aa88e83b4bfd@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



      reply	other threads:[~2026-05-28 14:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ahhK2nEo-HPgodNF@redhat.com \
    --to=bmasney@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=david@kernel.org \
    --cc=liam@infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ljs@kernel.org \
    --cc=mstorr@redhat.com \
    --cc=skhan@linuxfoundation.org \
    --cc=vbabka@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox