Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946133AbbHGSR3 (ORCPT ); Fri, 7 Aug 2015 14:17:29 -0400 Received: from mail-wi0-f175.google.com ([209.85.212.175]:33880 "EHLO mail-wi0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1945934AbbHGSR1 (ORCPT ); Fri, 7 Aug 2015 14:17:27 -0400 Date: Fri, 7 Aug 2015 20:17:23 +0200 From: Michal Hocko To: Kamezawa Hiroyuki Cc: Tejun Heo , mingo@redhat.com, peterz@infradead.org, hannes@cmpxchg.org, lizefan@huawei.com, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@fb.com Subject: Re: [PATCH v2 1/3] cgroup: define controller file conventions Message-ID: <20150807181722.GA24877@dhcp22.suse.cz> References: <1438641689-14655-1-git-send-email-tj@kernel.org> <1438641689-14655-2-git-send-email-tj@kernel.org> <20150804193101.GI17598@mtj.duckdns.org> <55C15B4C.9080202@jp.fujitsu.com> <20150805074758.GA11182@dhcp22.suse.cz> <55C2C6B0.3080203@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55C2C6B0.3080203@jp.fujitsu.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2183 Lines: 46 On Thu 06-08-15 11:30:08, KAMEZAWA Hiroyuki wrote: [...] > Sure. I think following has users. > - *.stat - for chekcing health of cgroup ,or for debug Yes but we want to have something which is closer to meminfo/vmstat IMO > - *.pressure_level - for notifying memory pressure Notifications are definitely useful I am just not sure this interface is the right one. We have seen some requests to adjust the interface to get new semantics (edge vs. level triggered). This should be sorted out before we expose the knob. > - *.swappiness - for adjusting LRU activity per application type. Yes, and I wanted to post a patch to export it several times but then I realized that this should be done only as long as vm.swappiness stays and it is not deprecated. And more and more I think about swappiness the less sure I am about it's usefulness. It is not doing much for quite some time because we are heavily biasing to the pagecache reclaim and the knob is more and more misleading. It is also not offering what people might want it to do. E.g. it doesn't allow for preferring swapout which might be useful when the swap is backed by a really fast storage. Maybe we will need a new metric here so I wouldn't rush exporting memcg alternative much. > - *.oom_control - for surviving/notifiyng out of memory > memcg's oom can be recovered if limit goes up rather than kill. I think it is very much useful - when used wisely. I have seen many calls for user defined OOM policies but then we have seen those that are more creative like having the policy maker live in the same memcg which requires some hacks to prevent from self-deadlocks. So overall this is very attractive but we might need to think about a better interface. BPF sounds like a potential way to go. I feel the memcg and the global approaches should be consistent as much as possible wrt. API. -- Michal Hocko SUSE Labs -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/