Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5879094yba; Thu, 11 Apr 2019 07:39:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzGWu20JVNMD349LpCvwUrbL3N57L5HZtRnOsCmllLracFRNyPgT042gZMJF4ybIWiEJzVH X-Received: by 2002:a17:902:266:: with SMTP id 93mr12689745plc.201.1554993547914; Thu, 11 Apr 2019 07:39:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554993547; cv=none; d=google.com; s=arc-20160816; b=Tg3aFAr2R+fspUGlQzk3R9Oqwn/loLFJILkJgbfy0sIg2dykTRaDe1bCtenEMZLKtp j97BShJkhKtQssJyGE/3wGwgLkaZu5igoARtBTm1GBJ78GqH0PLUi8yGgcDmD/K4wOlW k5bWXVAyNZR7moA+OwbhjVjFpmeZlR0LFL4/zXkdkIj0Uw+BFWxWbj+Ity0S2tMeF65n BpWA2B3BVig37OcGwYouurQYk9sbmvu1KcWQrgnQadoZO0f4nmXIbwSgXUBkuHzO1CGp EZ3dX8ZtqZ7GXQiqZirrLicwVNJbUMAqbzmMwspK9+41v1wXiY+xcUbbtrNu+KgwkJ6b h1kA== 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; bh=h76eSpzne8M4TmoMWfvEL9HDmjbo6inSFUsCztM/xrI=; b=fwTPmYWlC3kDuGv0c04LbJ6zqN1Am1QibLeZpuGjQBtlduNAhgBmZ37t8glMu6gUx9 ymV2uz81AZv5z/U3iYN2v/moNkME7M4PpMqhW0UEaR5vhHEnHcbhqN8eGxK1xdj43Oyj XFEAfqTxaxkYf6lkUwBQSre30cBQaDTk1dnBUEDyR1LwLg4c0fwpN8zZg15BhZvZ23sB +Qxldhjo4Zxt7JXxZWSJkF4Y5rDADCg70nKT95K5Rt/9GutnIf6FIpsnzKSvSRx2Bdze 9FNVkHGRUcGEbdbXzn/WD6jxNDMzKXgvyKQ6Dbsu7lMdJIst7Pjug/V6Se4ag/A5V8Cq PUbA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z3si34362069pfa.239.2019.04.11.07.38.51; Thu, 11 Apr 2019 07:39:07 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=virtuozzo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726699AbfDKOiJ (ORCPT + 99 others); Thu, 11 Apr 2019 10:38:09 -0400 Received: from relay.sw.ru ([185.231.240.75]:39876 "EHLO relay.sw.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726585AbfDKOiJ (ORCPT ); Thu, 11 Apr 2019 10:38:09 -0400 Received: from [172.16.25.169] by relay.sw.ru with esmtp (Exim 4.91) (envelope-from ) id 1hEapr-0002mK-Np; Thu, 11 Apr 2019 17:37:51 +0300 Subject: Re: [RFC PATCH 0/2] mm/memcontrol: Finer-grained memory control To: Waiman Long , Tejun Heo , Li Zefan , Johannes Weiner , Jonathan Corbet , Michal Hocko , Vladimir Davydov Cc: linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Roman Gushchin , Shakeel Butt , Aaron Lu , aryabinin@virtuozzo.com References: <20190410191321.9527-1-longman@redhat.com> From: Kirill Tkhai Message-ID: <1b6ee304-6176-15a0-c3fa-0b59cdd60085@virtuozzo.com> Date: Thu, 11 Apr 2019 17:37:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190410191321.9527-1-longman@redhat.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 10.04.2019 22:13, Waiman Long wrote: > The current control mechanism for memory cgroup v2 lumps all the memory > together irrespective of the type of memory objects. However, there > are cases where users may have more concern about one type of memory > usage than the others. > > We have customer request to limit memory consumption on anonymous memory > only as they said the feature was available in other OSes like Solaris. > > To allow finer-grained control of memory, this patchset 2 new control > knobs for memory controller: > - memory.subset.list for specifying the type of memory to be under control. > - memory.subset.high for the high limit of memory consumption of that > memory type. > > For simplicity, the limit is not hierarchical and applies to only tasks > in the local memory cgroup. > > Waiman Long (2): > mm/memcontrol: Finer-grained control for subset of allocated memory > mm/memcontrol: Add a new MEMCG_SUBSET_HIGH event > > Documentation/admin-guide/cgroup-v2.rst | 35 +++++++++ > include/linux/memcontrol.h | 8 ++ > mm/memcontrol.c | 100 +++++++++++++++++++++++- > 3 files changed, 142 insertions(+), 1 deletion(-) CC Andrey. In Virtuozzo kernel we have similar functionality for limitation of page cache in a cgroup: https://github.com/OpenVZ/vzkernel/commit/8ceef5e0c07c7621fcb0e04ccc48a679dfeec4a4