lkml.org 
[lkml]   [2014]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 6/6] cgroup, memcg: implement css->id and convert css_from_id() to use it
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(-)
>




\
 
 \ /
  Last update: 2014-04-28 06:01    [W:0.096 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site