[Devel] Re: [PATCH 3/4] provide a function to register more cftype files into memcg

Tejun Heo tj at kernel.org
Wed Mar 21 09:11:22 PDT 2012


On Wed, Mar 21, 2012 at 11:27:12AM +0400, Glauber Costa wrote:
> >>+int mem_cgroup_register_cftype(const struct cftype *cfts)
> >>+{
> >>+	return WARN_ON(cgroup_add_cftypes(&mem_cgroup_subsys, cfts));
> >>+}
> >>+EXPORT_SYMBOL(mem_cgroup_register_cftype);
> >
> >Why not just export mem_cgroup_subsys?
> >
> 
> I'm fine either way. I usually prefer not exporting raw data like
> this, but that's 100 % taste. How do you prefer me to do it?

I think exporting subsys directly is better than implementing thin
wrapper like above.  IMHO, wrappers like above don't add any
functionality and are likely to just obfuscate what's going on.

Thanks.

-- 
tejun




More information about the Devel mailing list