[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150119151854.GA28598@esperanza>
Date: Mon, 19 Jan 2015 18:18:54 +0300
From: Vladimir Davydov <vdavydov@...allels.com>
To: Tejun Heo <tj@...nel.org>
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
Hi Tejun,
On Mon, Jan 19, 2015 at 09:30:01AM -0500, Tejun Heo wrote:
> 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.
Could you please elaborate this? I mean, what problems do you think can
arise if we release css->id a little bit (one grace period) later?
Of course, I can introduce yet another id per memcg, but I think we have
css->id to avoid code duplication in controllers.
Thanks,
Vladimir
--
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