From: Roman Gushchin <guro@fb.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] mm: memcg/slab: wait for !root kmem_cache refcnt killing on root kmem_cache destruction
Date: Fri, 29 Nov 2019 02:28:11 +0000 [thread overview]
Message-ID: <20191129022806.GB68299@localhost.localdomain> (raw)
In-Reply-To: <20191128094312.GF26807@dhcp22.suse.cz>
On Thu, Nov 28, 2019 at 10:43:12AM +0100, Michal Hocko wrote:
> On Wed 27-11-19 17:27:29, Roman Gushchin wrote:
> > On Wed, Nov 27, 2019 at 01:32:25PM +0100, Michal Hocko wrote:
> > > On Tue 26-11-19 18:41:41, Roman Gushchin wrote:
> > > > On Tue, Nov 26, 2019 at 10:29:18AM +0100, Michal Hocko wrote:
> > > > > On Mon 25-11-19 10:54:53, Roman Gushchin wrote:
> > > [...]
> > > > > > So in a rare case when not all children kmem_caches are destroyed
> > > > > > at the moment when the root kmem_cache is about to be gone, we need
> > > > > > to wait another rcu grace period before destroying the root
> > > > > > kmem_cache.
> > > > >
> > > > > Could you explain how rare this really is please?
> > > >
> > > > It seems that we don't destroy root kmem_caches with enabled memcg
> > > > accounting that often, but maybe I'm biased here.
> > >
> > > So this happens each time a root kmem_cache is destroyed? Which would
> > > imply that only dynamically created ones?
> >
> > Yes, only dynamically created and only in those cases when destruction
> > of the root cache happens immediately after the deactivation of the
> > non-root cache.
> > Tbh I can't imagine any other case except rmmod after
> > removing the cgroup.
>
> Thanks for the confirmation! Could you please make this explicit in the
> changelog please? Maybe it is obvious to you but it took me quite some
> time to grasp what the hell is going on here. Both memcg and kmem_cache
> destruction are quite complex and convoluted.
Sure, will send v2 shorty.
Thanks!
prev parent reply other threads:[~2019-11-29 2:28 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-25 18:54 [PATCH] mm: memcg/slab: wait for !root kmem_cache refcnt killing on root kmem_cache destruction Roman Gushchin
2019-11-25 19:20 ` Shakeel Butt
2019-11-26 9:29 ` Michal Hocko
2019-11-26 9:33 ` Christian Borntraeger
2019-11-26 18:41 ` Roman Gushchin
2019-11-27 12:32 ` Michal Hocko
2019-11-27 17:27 ` Roman Gushchin
2019-11-28 9:43 ` Michal Hocko
2019-11-29 2:28 ` Roman Gushchin [this message]
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=20191129022806.GB68299@localhost.localdomain \
--to=guro@fb.com \
--cc=Kernel-team@fb.com \
--cc=akpm@linux-foundation.org \
--cc=borntraeger@de.ibm.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=stable@vger.kernel.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.