From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755604AbcEWNLv (ORCPT ); Mon, 23 May 2016 09:11:51 -0400 Received: from smtpoutz25.laposte.net ([194.117.213.100]:43053 "EHLO smtp.laposte.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755355AbcEWNLs (ORCPT ); Mon, 23 May 2016 09:11:48 -0400 Subject: Re: [PATCH] mm: add config option to select the initial overcommit mode To: One Thousand Gnomes References: <5731CC6E.3080807@laposte.net> <20160513080458.GF20141@dhcp22.suse.cz> <573593EE.6010502@free.fr> <5735A3DE.9030100@laposte.net> <20160513120042.GK20141@dhcp22.suse.cz> <5735CAE5.5010104@laposte.net> <20160513145101.GS20141@dhcp22.suse.cz> <5735EE7A.4010600@laposte.net> <20160513164113.6317c491@lxorguk.ukuu.org.uk> Cc: Michal Hocko , Mason , linux-mm@kvack.org, Andrew Morton , Linus Torvalds , LKML From: Sebastian Frias Message-ID: <57430190.1080401@laposte.net> Date: Mon, 23 May 2016 15:11:44 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160513164113.6317c491@lxorguk.ukuu.org.uk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-VR-SrcIP: 83.142.147.193 X-VR-FullState: 0 X-VR-Score: -100 X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrfeekledrfeelgdeiudcutefuodetggdotefrodftvfcurfhrohhf X-VR-Cause-2: ihhlvgemucfntefrqffuvffgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhs X-VR-Cause-3: ucdlqddutddtmdenucfjughrpefuvfhfhffkffgfgggjtgfgsehtjegrtddtfeehnecuhfhrohhmpefu X-VR-Cause-4: vggsrghsthhirghnucfhrhhirghsuceoshhfkeegsehlrghpohhsthgvrdhnvghtqeenucfkphepkeef X-VR-Cause-5: rddugedvrddugeejrdduleefnecurfgrrhgrmhepmhhouggvpehsmhhtphhouhhtpdhhvghloheplgdu X-VR-Cause-6: jedvrddvjedrtddrvddugegnpdhinhgvthepkeefrddugedvrddugeejrdduleefpdhmrghilhhfrhho X-VR-Cause-7: mhepshhfkeegsehlrghpohhsthgvrdhnvghtpdhrtghpthhtohepghhnohhmvghssehlgihorhhguhhk X-VR-Cause-8: rdhukhhuuhdrohhrghdruhhk X-VR-AvState: No X-VR-State: 0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alan, On 05/13/2016 05:41 PM, One Thousand Gnomes wrote: >> My understanding is that there was a time when there was no overcommit at all. >> If that's the case, understanding why overcommit was introduced would be helpful. > > Linux always had overcommit. > > The origin of overcommit is virtual memory for the most part. In a > classic swapping system without VM the meaning of brk() and thus malloc() > is that it allocates memory (or swap). Likewise this is true of fork() > and stack extension. > > In a virtual memory system these allocate _address space_. It does not > become populated except by page faulting, copy on write and the like. It > turns out that for most use cases on a virtual memory system we get huge > amounts of page sharing or untouched space. > > Historically Linux did guess based overcommit and I added no overcommit > support way back when, along with 'anything is allowed' support for > certain HPC use cases. > > The beancounter patches combined with this made the entire setup > completely robust but the beancounters never hit upstream although years > later they became part of the basis of the cgroups. > > You can sort of set a current Linux up for definitely no overcommit using > cgroups and no overcommit settings. It works for most stuff although last > I checked most graphics drivers were terminally broken (and not just to > no overcommit but to the point you can remote DoS Linux boxes with a > suitably constructed web page and chrome browser) > > Alan > Thanks for your comment, it certainly provides more clues and provided some history about the "overcommit" setting. I will see if we can do what we want with cgroups. Best regards, Sebastian