Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756219AbcCCDKO (ORCPT ); Wed, 2 Mar 2016 22:10:14 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:29703 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752007AbcCCDKL (ORCPT ); Wed, 2 Mar 2016 22:10:11 -0500 Subject: Re: [PATCHSET v2 cgroup/for-4.6] cgroup: make control mask updates modular and recursive To: Tejun Heo , References: <1456351368-786-1-git-send-email-tj@kernel.org> CC: , , From: Zefan Li Message-ID: <56D7A946.1090403@huawei.com> Date: Thu, 3 Mar 2016 11:02:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1456351368-786-1-git-send-email-tj@kernel.org> Content-Type: text/plain; charset="gbk" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.19.236] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A0B0206.56D7AACE.0040,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 7272ff69704601955b41325d6a3789c4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2546 Lines: 56 On 2016/2/25 6:02, Tejun Heo wrote: > Hello, > > Changes from v1[1] are > > * Patches 0012-0014 and 0016 added. They further refactor the > operations and convert existing css management paths to use the new > modular operations. > > * 0005 updated to yield the correct result on v1 hierarchies too. > > * 0015 updated to reflect earlier changes. > > Currently, subsystem enabling and disabling in the default hierarchy > are implemented as a long chain of interdependent operations in > cgroup_subtree_control_write(). The function calculates what need to > be done to its children and excute the necessary operations. The > function unfortunately ends up being a rather opaque blob of > operations which is difficult to wrap one's head around or reuse. > > This patchset restructures control mask update so that it's composed > of discrete idempotent and recursive operations and convert existing > css managment paths to use them which makes them simpler, more robust > and capable of recursive operations. > > This patchset includes the following 12 patches. > > 0001-cgroup-separate-out-interface-file-creation-from-css.patch > 0002-cgroup-explicitly-track-whether-a-cgroup_subsys_stat.patch > 0003-cgroup-reorder-operations-in-cgroup_mkdir.patch > 0004-cgroup-factor-out-cgroup_create-out-of-cgroup_mkdir.patch > 0005-cgroup-introduce-cgroup_control-and-cgroup_ss_mask.patch > 0006-cgroup-factor-out-cgroup_drain_offline-from-cgroup_s.patch > 0007-cgroup-factor-out-cgroup_apply_control_disable-from-.patch > 0008-cgroup-factor-out-cgroup_apply_control_enable-from-c.patch > 0009-cgroup-make-cgroup_drain_offline-and-cgroup_apply_co.patch > 0010-cgroup-introduce-cgroup_-save-propagate-restore-_con.patch > 0011-cgroup-factor-out-cgroup_-apply-finalize-_control-fr.patch > 0012-cgroup-combine-cgroup_mutex-locking-and-offline-css-.patch > 0013-cgroup-use-cgroup_apply_enable_control-in-cgroup-cre.patch > 0014-cgroup-reimplement-rebind_subsystems-using-cgroup_ap.patch > 0015-cgroup-make-cgroup_calc_subtree_ss_mask-take-this_ss.patch > 0016-cgroup-allocate-2x-cgrp_cset_links-when-setting-up-a.patch > > The patchset is available in the following git branch. > > git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git review-recursive-control > > diffstat follows. Thanks. > > include/linux/cgroup-defs.h | 3 > kernel/cgroup.c | 760 +++++++++++++++++++++++++------------------- > 2 files changed, 446 insertions(+), 317 deletions(-) > Acked-by: Zefan Li