[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150119143001.GH8140@htj.dyndns.org>
Date: Mon, 19 Jan 2015 09:30:01 -0500
From: Tejun Heo <tj@...nel.org>
To: Vladimir Davydov <vdavydov@...allels.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...e.cz>,
Christoph Lameter <cl@...ux.com>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Dave Chinner <david@...morbit.com>,
Al Viro <viro@...iv.linux.org.uk>, linux-mm@...ck.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm v2 3/7] cgroup: release css->id after css_free
On Mon, Jan 19, 2015 at 02:23:21PM +0300, Vladimir Davydov wrote:
> Currently, we release css->id in css_release_work_fn, right before
> calling css_free callback, so that when css_free is called, the id may
> have already been reused for a new cgroup.
>
> I am going to use css->id to create unique names for per memcg kmem
> caches. Since kmem caches are destroyed only on css_free, I need css->id
> to be freed after css_free was called to avoid name clashes. This patch
> therefore moves css->id removal to css_free_work_fn. To prevent
> css_from_id from returning a pointer to a stale css, it makes
> css_release_work_fn replace the css ptr at css_idr:css->id with NULL.
I think it'd be better if you create a separate id for this purpose.
The requirement is pretty unusual and likely contradictory with other
usages.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists