From: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org,
devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org,
"Aneesh Kumar K.V"
<aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
Subject: Re: [PATCH 3/4] provide a function to register more cftype files into memcg
Date: Tue, 20 Mar 2012 11:32:33 -0700 [thread overview]
Message-ID: <20120320183233.GC20832@google.com> (raw)
In-Reply-To: <1332262256-13407-4-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
Hey,
On Tue, Mar 20, 2012 at 08:50:55PM +0400, Glauber Costa wrote:
> The function mem_cgroup_register_cftype() is provided here, so
> an optional memcg subsystem that needs to register files at
> a time later than memcg initialization can do it.
>
> Signed-off-by: Glauber Costa <glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
> CC: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> CC: Aneesh Kumar K.V <aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
> ---
> include/linux/memcontrol.h | 1 +
> mm/memcontrol.c | 6 ++++++
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
> index 4d34356..bcf8de3 100644
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -141,6 +141,7 @@ static inline bool mem_cgroup_disabled(void)
> return false;
> }
>
> +int mem_cgroup_register_cftype(const struct cftype *cfts);
> void mem_cgroup_update_page_stat(struct page *page,
> enum mem_cgroup_page_stat_item idx,
> int val);
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index f7c6727..bd91a46 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -444,6 +444,12 @@ struct cgroup_subsys_state *mem_cgroup_css(struct mem_cgroup *memcg)
> return &memcg->css;
> }
>
> +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?
Thanks.
--
tejun
next prev parent reply other threads:[~2012-03-20 18:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 16:50 [PATCH 0/4] My contribution towards the end of populate() Glauber Costa
[not found] ` <1332262256-13407-1-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-03-20 16:50 ` [PATCH 1/4] don't trigger warning when d_subdirs is not empty Glauber Costa
2012-03-20 16:50 ` [PATCH 2/4] pass struct mem_cgroup instead of struct cgroup to socket memcg Glauber Costa
2012-03-20 16:50 ` [PATCH 3/4] provide a function to register more cftype files into memcg Glauber Costa
[not found] ` <1332262256-13407-4-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-03-20 18:32 ` Tejun Heo [this message]
[not found] ` <4F6982D0.1060403@parallels.com>
[not found] ` <4F6982D0.1060403-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-03-21 16:11 ` Tejun Heo
2012-03-20 16:50 ` [PATCH 4/4] get rid of populate for memcg Glauber Costa
[not found] ` <1332262256-13407-5-git-send-email-glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-03-20 18:31 ` Tejun Heo
[not found] ` <20120320183149.GB20832-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-03-21 7:36 ` Glauber Costa
[not found] ` <4F6984F3.2010009-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org>
2012-03-21 16:06 ` Tejun Heo
[not found] ` <20120321160610.GA4246-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2012-03-21 16:19 ` Tejun Heo
2012-03-21 16:30 ` Glauber Costa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120320183233.GC20832@google.com \
--to=tj-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=aneesh.kumar-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=devel-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org \
--cc=glommer-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org \
--cc=kamezawa.hiroyu-+CUm20s59erQFUHtdCDX3A@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).