From: Vladimir Davydov <vdavydov@virtuozzo.com>
To: Michal Hocko <mhocko@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] mm: memcontrol: fix swap counter leak on swapout from offline cgroup
Date: Tue, 2 Aug 2016 16:22:00 +0300 [thread overview]
Message-ID: <20160802132200.GE13263@esperanza> (raw)
In-Reply-To: <20160802124231.GJ12403@dhcp22.suse.cz>
On Tue, Aug 02, 2016 at 02:42:32PM +0200, Michal Hocko wrote:
>
> On Mon 01-08-16 16:26:24, Vladimir Davydov wrote:
> [...]
> > +static struct mem_cgroup *mem_cgroup_id_get_active(struct mem_cgroup *memcg)
> > +{
> > + while (!atomic_inc_not_zero(&memcg->id.ref))
> > + memcg = parent_mem_cgroup(memcg);
> > + return memcg;
> > +}
>
> Does this actually work properly? Say we have root -> A so parent is
> NULL if root (use_hierarchy == false).
Yeah, I completely forgot about the !use_hierarchy case. Thanks for
catching this. I'll fix and resend.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2016-08-02 13:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-01 13:26 [PATCH 1/3] mm: memcontrol: fix swap counter leak on swapout from offline cgroup Vladimir Davydov
2016-08-01 13:26 ` [PATCH 2/3] mm: memcontrol: fix memcg id ref counter on swap charge move Vladimir Davydov
2016-08-02 12:34 ` Michal Hocko
2016-08-01 13:26 ` [PATCH 3/3] mm: memcontrol: add sanity checks for memcg->id.ref on get/put Vladimir Davydov
2016-08-02 12:45 ` Michal Hocko
2016-08-02 15:51 ` Michal Hocko
2016-08-02 12:23 ` [PATCH 1/3] mm: memcontrol: fix swap counter leak on swapout from offline cgroup Michal Hocko
2016-08-02 12:42 ` Michal Hocko
2016-08-02 13:22 ` Vladimir Davydov [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=20160802132200.GE13263@esperanza \
--to=vdavydov@virtuozzo.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).