From mboxrd@z Thu Jan 1 00:00:00 1970 From: Li Zefan Subject: Re: [PATCH 2/7] [RFC]Move the cgroup debug subsys into cgroup.c to access internal state Date: Tue, 17 Mar 2009 14:44:32 +0800 Message-ID: <49BF46D0.6000909@cn.fujitsu.com> References: <20090312104507.24154.71691.stgit@menage.corp.google.com> <20090312105127.24154.39200.stgit@menage.corp.google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20090312105127.24154.39200.stgit-B63HFAS8fGlSzHKm+aFRNNkmqwFzkYv6@public.gmane.org> 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: Paul Menage Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: containers.vger.kernel.org > +static u64 current_css_set_refcount_read(struct cgroup *cont, we can change those 'cont' to 'cgrp' along with this patch > + struct cftype *cft) > +{ > + u64 count; > + > + rcu_read_lock(); > + count = atomic_read(¤t->cgroups->refcount); > + rcu_read_unlock(); > + return count; > +} > + > +static u64 releasable_read(struct cgroup *cgrp, struct cftype *cft) > +{ > + return test_bit(CGRP_RELEASABLE, &cgrp->flags); > +} > + > +static struct cftype debug_files[] = { > + { > + .name = "cgroup_refcount", > + .read_u64 = cgroup_refcount_read, > + }, a trivial inconsistency that no blank line here > + { > + .name = "taskcount", > + .read_u64 = taskcount_read, > + }, > + > + { > + .name = "current_css_set", > + .read_u64 = current_css_set_read, > + }, > + > + { > + .name = "current_css_set_refcount", > + .read_u64 = current_css_set_refcount_read, > + }, > + > + { > + .name = "releasable", > + .read_u64 = releasable_read, > + }, > +};