Received: by 10.192.165.148 with SMTP id m20csp493971imm; Fri, 20 Apr 2018 10:02:56 -0700 (PDT) X-Google-Smtp-Source: AIpwx4++VdAaPFwslgNYY+rwyzhBy3BmaXBLuV8XQKA019mExCoN43FkpzbycXPEhtALqIt5Hqed X-Received: by 10.99.115.69 with SMTP id d5mr9049314pgn.289.1524243776659; Fri, 20 Apr 2018 10:02:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524243776; cv=none; d=google.com; s=arc-20160816; b=JvX0LRsjfFYl4MMPAKcoeH1OE8qRJKXSAk1e/eC1k/AF5N5j1ehhWSld93lpuEPW4Y cUS5hryOj2+LtqluqtqdWUQCiY8toQbCMMZ7HdDjhZb74PgLUdLSdpNPGXB9DGyJYF9p Hip8d5s9xfSlB5g0lXhUjAjGJPeg+pcCapFi8v+2+LhLYYUO2MoFlVQ9nvDa6xYNTLnf NIh3mDf3QxFj++XW7+khKhBh3D+GhSLO3nrBLJidWFg0b1vTE+nrLiDdL93qGzasKx5K 7o1lYedbngea5teS1z/rRmqrcFuMI1uwmARgtqqWOF+pnQqxmdpBwuMcIgKkC7JWIV/7 7SDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=Rk/w/5zPhGt5KGLe04p9SZJUsnIRlMTryTo2SVcxNDM=; b=HObwq4Zce631OAaE/RIrrPKcicsxyQ2qn65CCEw7A7uD6NvLLec3LRvtVCuNdU6mcY wR3xKIy8RK/pgnPByZ1h7gBM1m+DG2KVSG5UbosP5LLaAES3aRLl18AlvfjETRiorvLm LJHORqjOp3lYVY0CWumSVKzVMBI21D566K4r10uLdz3NAUM5PPEBSdinwdb1YAZ+bvsL Zfgq2vpSw7hMM8SPUS5oPAXleiPpsIunrPZdB54pglhMNEHiYJKtkiKOrHVCTH4u35tF nQMNnQwPI4E2LykT8hkPOQpaI3DZU9oTLRDAT1/d76f+he4gV2VyBF7cNgPLktfa3ek0 56bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=n7omMFPu; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a5-v6si6061906pls.571.2018.04.20.10.02.40; Fri, 20 Apr 2018 10:02:56 -0700 (PDT) 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=fail header.i=@infradead.org header.s=merlin.20170209 header.b=n7omMFPu; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753446AbeDTRBX (ORCPT + 99 others); Fri, 20 Apr 2018 13:01:23 -0400 Received: from merlin.infradead.org ([205.233.59.134]:54682 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753158AbeDTRBW (ORCPT ); Fri, 20 Apr 2018 13:01:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Rk/w/5zPhGt5KGLe04p9SZJUsnIRlMTryTo2SVcxNDM=; b=n7omMFPuz3KMIfzw9Ud3APtdpW PtyMp6JR0cq7PkSIXrlJdDm8crfHGF1Ny5kJ/oUF64auPBy0fZoJf1VYxqcopxKdF7hz7GDzbq218 kNPX9TdZZBzTJJxSbMk2e4iF+fh48Tk9iQ3HsBNDR4jJQRfmIIPkTfKQgXa0AbysawP7LqSlvj+LF TJt0i9rC5PQn3I2G4fP/Dk9cI3Prf0Tv0DSLEp+CmET1SvDo6lZCPa97kzzHLVUwjuA6nUhZm6wS/ QC+Qzl2cc7RGgwI+c4F2CncakczoRcIuakAuIdGQB7IV711OA+F/89rrXInDV7zwzY9C2nXEIJgGC H16N1hJQ==; Received: from static-50-53-52-16.bvtn.or.frontiernet.net ([50.53.52.16] helo=midway.dunlab) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1f9ZPF-0006YZ-Or; Fri, 20 Apr 2018 17:01:06 +0000 Subject: Re: [PATCH 1/2] mm: introduce memory.min To: Roman Gushchin , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, kernel-team@fb.com, Johannes Weiner , Michal Hocko , Vladimir Davydov , Tejun Heo References: <20180420163632.3978-1-guro@fb.com> From: Randy Dunlap Message-ID: <527af98a-8d7f-42ab-9ba8-71444ef7e25f@infradead.org> Date: Fri, 20 Apr 2018 10:01:04 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180420163632.3978-1-guro@fb.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/20/18 09:36, Roman Gushchin wrote: > --- > Documentation/cgroup-v2.txt | 20 +++++++++ > include/linux/memcontrol.h | 15 ++++++- > include/linux/page_counter.h | 11 ++++- > mm/memcontrol.c | 99 ++++++++++++++++++++++++++++++++++++-------- > mm/page_counter.c | 63 ++++++++++++++++++++-------- > mm/vmscan.c | 19 ++++++++- > 6 files changed, 189 insertions(+), 38 deletions(-) > > diff --git a/Documentation/cgroup-v2.txt b/Documentation/cgroup-v2.txt > index 657fe1769c75..49c846020f96 100644 > --- a/Documentation/cgroup-v2.txt > +++ b/Documentation/cgroup-v2.txt > @@ -1002,6 +1002,26 @@ PAGE_SIZE multiple when read back. > The total amount of memory currently being used by the cgroup > and its descendants. > > + memory.min > + A read-write single value file which exists on non-root > + cgroups. The default is "0". > + > + Hard memory protection. If the memory usage of a cgroup > + is within its effectife min boundary, the cgroup's memory effective > + won't be reclaimed under any conditions. If there is no > + unprotected reclaimable memory available, OOM killer > + is invoked. > + > + Effective low boundary is limited by memory.min values of > + all ancestor cgroups. If there is memory.mn overcommitment memory.min ? overcommit > + (child cgroup or cgroups are requiring more protected memory, drop ending ',' ^^ > + than parent will allow), then each child cgroup will get > + the part of parent's protection proportional to the its to its > + actual memory usage below memory.min. > + > + Putting more memory than generally available under this > + protection is discouraged and may lead to constant OOMs. > + > memory.low > A read-write single value file which exists on non-root > cgroups. The default is "0". -- ~Randy