From mboxrd@z Thu Jan 1 00:00:00 1970 From: Glauber Costa Subject: Re: [PATCH REPOST RFC cgroup/for-3.7] cgroup: mark subsystems with broken hierarchy support and whine if cgroups are nested for them Date: Wed, 12 Sep 2012 13:34:13 +0400 Message-ID: <50505715.6050805@parallels.com> References: <20120910223125.GC7677@google.com> <20120910223355.GD7677@google.com> <504F30DB.60808@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <504F30DB.60808-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Li Zefan Cc: Neil Horman , "Serge E. Hallyn" , containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Michal Hocko , Thomas Graf , Ingo Molnar , Paul Mackerras , "Aneesh Kumar K.V" , Arnaldo Carvalho de Melo , Johannes Weiner , Tejun Heo , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Paul Turner , Vivek Goyal On 09/11/2012 04:38 PM, Li Zefan wrote: > On 2012/9/11 6:33, Tejun Heo wrote: >> (forgot cc'ing containers / cgroups mailing lists and used the old >> address for Li. Reposting. Sorry for the noise.) >> >> Currently, cgroup hierarchy support is a mess. cpu related subsystems >> behave correctly - configuration, accounting and control on a parent >> properly cover its children. blkio and freezer completely ignore >> hierarchy and treat all cgroups as if they're directly under the root >> cgroup. Others show yet different behaviors. >> >> These differing interpretations of cgroup hierarchy make using cgroup >> confusing and it impossible to co-mount controllers into the same >> hierarchy and obtain sane behavior. >> >> Eventually, we want full hierarchy support from all subsystems and >> probably a unified hierarchy. Users using separate hierarchies >> expecting completely different behaviors depending on the mounted >> subsystem is deterimental to making any progress on this front. >> >> This patch adds cgroup_subsys.broken_hierarchy and sets it to %true >> for controllers which are lacking in hierarchy support. The goal of >> this patch is two-fold. >> >> * Move users away from using hierarchy on currently non-hierarchical >> subsystems, so that implementing proper hierarchy support on those >> doesn't surprise them. >> >> * Keep track of which controllers are broken how and nudge the >> subsystems to implement proper hierarchy support. >> >> For now, start with a single warning message. We can whine louder >> later on. >> >> (I tried to document what's broken and how it should be fixed. If I >> got something wrong, please let me know.) >> > > So isn't cpuset broken too? child cpuset's cpu mask isn't necessary a subset > of the parent's if the cpu_exclusive flag is not set. > Li is right, cpu_exclusive is pretty much cpuset's version of memcg's use_hierarchy. the only problem is that it seem to be by design, unlike memcg's, which was there to bypass a performance problem to the best of my knowledge. Even then, we should maybe think about start enforcing that flag as well.