From: Li Zefan <lizefan-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
To: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org,
mhocko-AlSwsSmVLrQ@public.gmane.org,
nasa4836-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Subject: Re: [PATCH 6/6] cgroup, memcg: implement css->id and convert css_from_id() to use it
Date: Mon, 28 Apr 2014 11:33:16 +0800 [thread overview]
Message-ID: <535DCBFC.4000404@huawei.com> (raw)
In-Reply-To: <1398373333-1521-7-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
On 2014/4/25 5:02, Tejun Heo wrote:
> Until now, cgroup->id has been used to identify all the associated
> csses and css_from_id() takes cgroup ID and returns the matching css
> by looking up the cgroup and then dereferencing the css associated
> with it; however, now that the lifetimes of cgroup and css are
> separate, this is incorrect and breaks on the unified hierarchy when a
> controller is disabled and enabled back again before the previous
> instance is released.
>
> This patch adds css->id which is a subsystem-unique ID and converts
> css_from_id() to look up by the new css->id instead. memcg is the
> only user of css_from_id() and also converted to use css->id instead.
>
netprio_cgroup also needs to be updated.
> For traditional hierarchies, this shouldn't make any functional
> difference.
>
> Signed-off-by: Tejun Heo <tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
> Cc: Michal Hocko <mhocko-AlSwsSmVLrQ@public.gmane.org>
> Cc: Jianyu Zhan <nasa4836-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> include/linux/cgroup.h | 9 ++++++++
> kernel/cgroup.c | 59 ++++++++++++++++++++++++++++++++------------------
> mm/memcontrol.c | 4 ++--
> 3 files changed, 49 insertions(+), 23 deletions(-)
>
WARNING: multiple messages have this Message-ID (diff)
From: Li Zefan <lizefan@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: <cgroups@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<hannes@cmpxchg.org>, <mhocko@suse.cz>, <nasa4836@gmail.com>
Subject: Re: [PATCH 6/6] cgroup, memcg: implement css->id and convert css_from_id() to use it
Date: Mon, 28 Apr 2014 11:33:16 +0800 [thread overview]
Message-ID: <535DCBFC.4000404@huawei.com> (raw)
In-Reply-To: <1398373333-1521-7-git-send-email-tj@kernel.org>
On 2014/4/25 5:02, Tejun Heo wrote:
> Until now, cgroup->id has been used to identify all the associated
> csses and css_from_id() takes cgroup ID and returns the matching css
> by looking up the cgroup and then dereferencing the css associated
> with it; however, now that the lifetimes of cgroup and css are
> separate, this is incorrect and breaks on the unified hierarchy when a
> controller is disabled and enabled back again before the previous
> instance is released.
>
> This patch adds css->id which is a subsystem-unique ID and converts
> css_from_id() to look up by the new css->id instead. memcg is the
> only user of css_from_id() and also converted to use css->id instead.
>
netprio_cgroup also needs to be updated.
> For traditional hierarchies, this shouldn't make any functional
> difference.
>
> Signed-off-by: Tejun Heo <tj@kernel.org>
> Cc: Johannes Weiner <hannes@cmpxchg.org>
> Cc: Michal Hocko <mhocko@suse.cz>
> Cc: Jianyu Zhan <nasa4836@gmail.com>
> ---
> include/linux/cgroup.h | 9 ++++++++
> kernel/cgroup.c | 59 ++++++++++++++++++++++++++++++++------------------
> mm/memcontrol.c | 4 ++--
> 3 files changed, 49 insertions(+), 23 deletions(-)
>
next prev parent reply other threads:[~2014-04-28 3:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-24 21:02 [PATCHSET cgroup/for-3.16] cgroup: implement css->id Tejun Heo
2014-04-24 21:02 ` Tejun Heo
2014-04-24 21:02 ` [PATCH 1/6] cgroup: make flags and subsys_masks unsigned int Tejun Heo
2014-04-24 21:02 ` [PATCH 2/6] cgroup, memcg: allocate cgroup ID from 1 Tejun Heo
[not found] ` <1398373333-1521-3-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-30 13:11 ` Michal Hocko
2014-04-30 13:11 ` Michal Hocko
2014-04-24 21:02 ` [PATCH 3/6] cgroup: protect cgroup_root->cgroup_idr with a spinlock Tejun Heo
2014-04-24 21:02 ` [PATCH 4/6] cgroup: use RCU free in create_css() failure path Tejun Heo
2014-04-24 21:02 ` [PATCH 5/6] cgroup: update init_css() into init_and_link_css() Tejun Heo
[not found] ` <1398373333-1521-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-24 21:02 ` [PATCH 6/6] cgroup, memcg: implement css->id and convert css_from_id() to use it Tejun Heo
2014-04-24 21:02 ` Tejun Heo
[not found] ` <1398373333-1521-7-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2014-04-28 3:33 ` Li Zefan [this message]
2014-04-28 3:33 ` Li Zefan
[not found] ` <535DCBFC.4000404-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2014-05-01 15:46 ` Tejun Heo
2014-05-01 15:46 ` Tejun Heo
[not found] ` <20140501154630.GG31611-Gd/HAXX7CRxy/B6EtB590w@public.gmane.org>
2014-05-04 6:02 ` Li Zefan
2014-05-04 6:02 ` Li Zefan
2014-04-30 13:24 ` Michal Hocko
2014-04-30 13:24 ` Michal Hocko
2014-05-04 6:08 ` [PATCHSET cgroup/for-3.16] cgroup: implement css->id Li Zefan
2014-05-04 6:08 ` Li Zefan
2014-05-04 19:18 ` Tejun Heo
2014-05-04 19:18 ` Tejun Heo
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=535DCBFC.4000404@huawei.com \
--to=lizefan-hv44wf8li93qt0dzr+alfa@public.gmane.org \
--cc=cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mhocko-AlSwsSmVLrQ@public.gmane.org \
--cc=nasa4836-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tj-DgEjT+Ai2ygdnm+yROfE0A@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.