[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YfnBuNYkoTlaX+Wk@carbon.dhcp.thefacebook.com>
Date: Tue, 1 Feb 2022 15:26:48 -0800
From: Roman Gushchin <guro@...com>
To: Tejun Heo <tj@...nel.org>
CC: Andrew Morton <akpm@...ux-foundation.org>, <linux-mm@...ck.org>,
<linux-kernel@...r.kernel.org>,
Alexander Egorenkov <egorenar@...ux.ibm.com>,
Waiman Long <longman@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Shakeel Butt <shakeelb@...gle.com>,
Jeremy Linton <jeremy.linton@....com>,
<cgroups@...r.kernel.org>
Subject: Re: [PATCH RESEND] mm: memcg: synchronize objcg lists with a
dedicated spinlock
On Tue, Feb 01, 2022 at 12:48:41PM -1000, Tejun Heo wrote:
> On Tue, Feb 01, 2022 at 02:33:04PM -0800, Roman Gushchin wrote:
> ...
> > In this example a slab allocation from __send_signal() caused a
> > refilling and draining of a percpu objcg stock, resulted in a
> > releasing of another non-related objcg. Objcg release path requires
> > taking the css_set_lock, which is used to synchronize objcg lists.
> >
> > This can create a circular dependency with the sighandler lock,
> > which is taken with the locked css_set_lock by the freezer code
> > (to freeze a task).
> >
> > In general it seems that using css_set_lock to synchronize objcg lists
> > makes any slab allocations and deallocation with the locked
> > css_set_lock and any intervened locks risky.
> >
> > To fix the problem and make the code more robust let's stop using
> > css_set_lock to synchronize objcg lists and use a new dedicated
> > spinlock instead.
> >
> > Fixes: bf4f059954dc ("mm: memcg/slab: obj_cgroup API")
> > Signed-off-by: Roman Gushchin <guro@...com>
> > Reported-by: Alexander Egorenkov <egorenar@...ux.ibm.com>
> > Tested-by: Alexander Egorenkov <egorenar@...ux.ibm.com>
> > Reviewed-by: Waiman Long <longman@...hat.com>
> > Cc: Tejun Heo <tj@...nel.org>
> > Cc: Johannes Weiner <hannes@...xchg.org>
> > Cc: Shakeel Butt <shakeelb@...gle.com>
> > Cc: Jeremy Linton <jeremy.linton@....com>
> > Cc: cgroups@...r.kernel.org
>
> Acked-by: Tejun Heo <tj@...nel.org>
Thank you!
>
> I suppose this will go through -mm? If you want me to route it through the
> cgroup tree, please let me know.
I think so, usually this stuff goes through @mm.
Thanks!
Powered by blists - more mailing lists