From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8FE3BC433EF for ; Sat, 11 Dec 2021 22:22:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8346B6B0071; Sat, 11 Dec 2021 17:22:00 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7E30D6B0073; Sat, 11 Dec 2021 17:22:00 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6D2396B0074; Sat, 11 Dec 2021 17:22:00 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0137.hostedemail.com [216.40.44.137]) by kanga.kvack.org (Postfix) with ESMTP id 5DCBC6B0071 for ; Sat, 11 Dec 2021 17:22:00 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0E1DA181AEF1E for ; Sat, 11 Dec 2021 22:21:50 +0000 (UTC) X-FDA: 78906936780.13.3ACCF02 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf14.hostedemail.com (Postfix) with ESMTP id DCC3910000C for ; Sat, 11 Dec 2021 22:21:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OR7MJxyz9yi9GRif0LyRjFc5JufWB/LgEct4g0DHtRo=; b=NdISd7c+CE9Cr1M5d12kS3JQaJ GpciRXX48yuTdNDcC5lu8PnyY6AFiaMODdiCLCOU0kg/fCLhKoy3Mfuuh6W0gW8iWyagG5vH+VWT3 IC75pxmdvGiPCL0HuJKVRNW0+ryiUUJecsHgHef3cx/ytlNUF5GiJEwqDSZYuCmXPWkwirz5DzbHZ 02KUCm6PXtoi9kYl7joby42noUw0WnyQthGL8mcOyGqS/iwlUXEOilZlNSIjhmdFaSLs68VDUCfLw lRHvX1HsdWppQ2V02FAJJlq+b1TORWzdFQU0yOwmIOqP++a8OD4QMiK2Q2u+HxiBcJ0vg00w0fAd/ 79NarRhg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mwAkQ-00BWe5-6j; Sat, 11 Dec 2021 22:21:42 +0000 Date: Sat, 11 Dec 2021 22:21:42 +0000 From: Matthew Wilcox To: Anssi Hannula Cc: Jonathan Corbet , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] docs/vm: clarify overcommit amount sysctl behavior Message-ID: References: <20211211194159.3137362-1-anssi.hannula@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211211194159.3137362-1-anssi.hannula@iki.fi> X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: DCC3910000C X-Stat-Signature: 9au4anwfmcxkqwb7jeex9rgucjq55yij Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=NdISd7c+; spf=none (imf14.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org; dmarc=none X-HE-Tag: 1639261307-559340 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sat, Dec 11, 2021 at 09:41:59PM +0200, Anssi Hannula wrote: > Documentation/vm/overcommit-accounting.rst says that the overcommit > amount can be set via vm.overcommit_ratio and vm.overcommit_kbytes. > > Add a clarification that those only take effect in overcommit handling > mode 2 ("Don't overcommit"), i.e. they do not act as an "additional" > limit that is always enforced. > > Signed-off-by: Anssi Hannula > --- Simple and clear improvement, IMO. Cc'ing linux-mm to get more eyes on it. > I've had to look this one up in the code enough times already :) > > > Documentation/vm/overcommit-accounting.rst | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/Documentation/vm/overcommit-accounting.rst b/Documentation/vm/overcommit-accounting.rst > index 0dd54bbe4afa..1addb0c374a4 100644 > --- a/Documentation/vm/overcommit-accounting.rst > +++ b/Documentation/vm/overcommit-accounting.rst > @@ -34,7 +34,8 @@ The Linux kernel supports the following overcommit handling modes > The overcommit policy is set via the sysctl ``vm.overcommit_memory``. > > The overcommit amount can be set via ``vm.overcommit_ratio`` (percentage) > -or ``vm.overcommit_kbytes`` (absolute value). > +or ``vm.overcommit_kbytes`` (absolute value). These only have an effect > +when ``vm.overcommit_memory`` is set to 2. > > The current overcommit limit and amount committed are viewable in > ``/proc/meminfo`` as CommitLimit and Committed_AS respectively. > -- > 2.31.1 >