Received: by 10.223.164.202 with SMTP id h10csp2083545wrb; Mon, 27 Nov 2017 11:37:48 -0800 (PST) X-Google-Smtp-Source: AGs4zMaoeazpJ+0vFvfjLzeyo3xT3kGMF1fOLHGlvR/r56wfYNlDcb3kxuoVubxWftrOeiQmTHyy X-Received: by 10.98.214.21 with SMTP id r21mr38254055pfg.74.1511811468488; Mon, 27 Nov 2017 11:37:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511811468; cv=none; d=google.com; s=arc-20160816; b=RxLNpHR7osQvpC6prpbet3xL2ya6wrOJfN8IB30Fc6O57AFeRqMPbMjVNHk9hMO2sv 1HXwHbLTpi6+sFplD+yyELuQrBpgkkmfWxByZLFf8/QA0ZfiP+qjTMKpEmNO9yniEzqn cXzjwE+bSYO2K3QQ31KQqf23CwtIZ1PRrLlKFIFdiQnFeEuHrACTxPCQjceKwxkCtg0N 4rNTRh82H7w6Zt/01RRnTAkD+ByISZp+xW+slIcDjSoOaBa2W+z2G9P2IjQLprlZ4xdF YjAj40zIr74RL9lerebpHsciywxS+pG7bK6W71VXRTKdNgITrtCPK7psjJJTOlCWa+Tw j94A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Sr+sc2ebc91h5aXVYzPCt44R2N0Rzfb1pT5e+8bwsTo=; b=Qaqrt1eMIxqmKgkYVsuijlPC/GnygMpAmGDyIzUxiH+CH4ZyDe1pA1/BL23CwF/ECA 2ZoaRN/Gurlit9WZrWhxYa8PWuAeVIl0aPAdiNvgYkUhIKLWbLEiifIrF7kiDnU5giLR csnMiBEPctiZS7TypQt0IGt/ngH0yFLfgkqCqDdStu9Zm5ec/AYDKk5NzFJqet8+BqM/ 2vtqz2fnc1sgdHoIWaHk5LKekoA8r0TDI2d/W4GfheMCR1GYILzheqQQoJ6w/PzohLju qE9ek5KOzV+bLz2HMzeKWFV5hK4XxNz7qyis4ppXFFQ/PoVKIrUSS6+LejAoLy5QwI4f IBuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iCVXHHPh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s15si23560515pgc.789.2017.11.27.11.37.36; Mon, 27 Nov 2017 11:37:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iCVXHHPh; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753647AbdK0ThA (ORCPT + 79 others); Mon, 27 Nov 2017 14:37:00 -0500 Received: from mail-ot0-f181.google.com ([74.125.82.181]:40286 "EHLO mail-ot0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752734AbdK0Tg5 (ORCPT ); Mon, 27 Nov 2017 14:36:57 -0500 Received: by mail-ot0-f181.google.com with SMTP id g104so25284924otg.7; Mon, 27 Nov 2017 11:36:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Sr+sc2ebc91h5aXVYzPCt44R2N0Rzfb1pT5e+8bwsTo=; b=iCVXHHPhFIwHmvvcmsdEGFP6LPnhFmiBjCTP5nekUbydy5HA/47I1Eb1gqPgKSzL+M HDS4B5vvObWDgjpg5b1qLTdxu8K90FDum8HeULbFN+mgw6bV7iuQ3/1wXNLkQ+lL4wob kk5FkCLzpzrf2H6elcmKEkVeMCuBVkq1nuk0oPo26KG7J/q5MFytusT3SjKoqeAPZHpt KYDocBahxD6YKVLn+tpXEv/j+Czl8d5ZV8UvciIxXviwcf6beF2p09qcXwJHk+wHB7m4 FzF+VUOliA3GcuIqURal6RytO9pSgUU53/pFxZTCzAoaAKOaBJm4uRWQODbHFR6+j6PC 8qww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Sr+sc2ebc91h5aXVYzPCt44R2N0Rzfb1pT5e+8bwsTo=; b=AKoM1uqHfLChvsM0qxxlOI+FWVEFPnuC73NmhGgF6yEKtZa5S/IMftVOM8Qyo0BEDP UoxM0kBxvrUysTWTZy2NcgS2fq6poL2xDhJcuKJpc90oiSroyqF2908TiZOJnWiXbwHO GoVmRs/sn+ZofK+/8O9QcDe0TWnJXyDSHYUNPw9nhWU0fJwh2eGwfTADea3Q9V034ppy 4SYM17GvF+JSJrbouhrJ8odMotmwbfmXeKqDjtC/sS8Ouovov1LmRM7MVKcwdSVBubdK 5J/NfYOYtevx7epyE3Tt8daZ2DKbwdDIztFYd66Gb08xnlEhAP3UPSuBiK0ZrXVYJ47d owbg== X-Gm-Message-State: AJaThX4JHk1kbr9o0eOSNc3aLqo3/5hMvaHtr7jXYEoaqCvUt4aMlQwi rrA4gB3/2ec1nvsRjKKEDHLuBhMI5QGH2bUoWmY= X-Received: by 10.157.34.228 with SMTP id y91mr27162514ota.290.1511811416216; Mon, 27 Nov 2017 11:36:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.50.138 with HTTP; Mon, 27 Nov 2017 11:36:55 -0800 (PST) In-Reply-To: <87vahv8whv.fsf@linux.intel.com> References: <23066.59196.909026.689706@gargle.gargle.HOWL> <20171127101232.ykriowhatecnvjvg@dhcp22.suse.cz> <87vahv8whv.fsf@linux.intel.com> From: Mikael Pettersson Date: Mon, 27 Nov 2017 20:36:55 +0100 Message-ID: Subject: Re: [PATCH] mm: disable `vm.max_map_count' sysctl limit To: Andi Kleen Cc: Michal Hocko , linux-mm@kvack.org, "linux-kernel@vger.kernel.org" , linux-fsdevel@vger.kernel.org, Linux API Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2017 at 6:25 PM, Andi Kleen wrote: > It's an arbitrary scaling limit on the how many mappings the process > has. The more memory you have the bigger a problem it is. We've > ran into this problem too on larger systems. > > The reason the limit was there originally because it allows a DoS > attack against the kernel by filling all unswappable memory up with VMAs. > > The old limit was designed for much smaller systems than we have > today. > > There needs to be some limit, but it should be on the number of memory > pinned by the VMAs, and needs to scale with the available memory, > so that large systems are not penalized. Fully agreed. One problem with the current limit is that number of VMAs is only weakly related to the amount of memory one has mapped, and is also prone to grow due to memory fragmentation. I've seen processes differ by 3X number of VMAs, even though they ran the same code and had similar memory sizes; they only differed on how long they had been running and which servers they ran on (and how long those had been up). > Unfortunately just making it part of the existing mlock limit could > break some existing setups which max out the mlock limit with something > else. Maybe we need a new rlimit for this? > > -Andi From 1585248692460426369@xxx Mon Nov 27 19:29:23 +0000 2017 X-GM-THRID: 1585145582796220475 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread