[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160802124231.GJ12403@dhcp22.suse.cz>
Date: Tue, 2 Aug 2016 14:42:32 +0200
From: Michal Hocko <mhocko@...nel.org>
To: Vladimir Davydov <vdavydov@...tuozzo.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Johannes Weiner <hannes@...xchg.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] mm: memcontrol: fix swap counter leak on swapout
from offline cgroup
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).
--
Michal Hocko
SUSE Labs
Powered by blists - more mailing lists