Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760388AbbEEQLq (ORCPT ); Tue, 5 May 2015 12:11:46 -0400 Received: from mx2.parallels.com ([199.115.105.18]:41104 "EHLO mx2.parallels.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752915AbbEEQFM (ORCPT ); Tue, 5 May 2015 12:05:12 -0400 Date: Tue, 5 May 2015 19:04:59 +0300 From: Vladimir Davydov To: Tejun Heo CC: Andrew Morton , Johannes Weiner , Michal Hocko , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim , Greg Thelen , , , Subject: Re: [PATCH 2/2] kernfs: do not account ino_ida allocations to memcg Message-ID: <20150505160459.GA23654@esperanza> References: <0cf48f4219721952f182715a61910f626d7c4aca.1430819044.git.vdavydov@parallels.com> <20150505134521.GL1971@htj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20150505134521.GL1971@htj.duckdns.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1667 Lines: 36 On Tue, May 05, 2015 at 09:45:21AM -0400, Tejun Heo wrote: > On Tue, May 05, 2015 at 12:45:43PM +0300, Vladimir Davydov wrote: > > root->ino_ida is used for kernfs inode number allocations. Since IDA has > > a layered structure, different IDs can reside on the same layer, which > > is currently accounted to some memory cgroup. The problem is that each > > kmem cache of a memory cgroup has its own directory on sysfs (under > > /sys/fs/kernel//cgroup). If the inode number of such a > > directory or any file in it gets allocated from a layer accounted to the > > cgroup which the cache is created for, the cgroup will get pinned for > > good, because one has to free all kmem allocations accounted to a cgroup > > in order to release it and destroy all its kmem caches. That said we > > must not account layers of ino_ida to any memory cgroup. > > > > Since per net init operations may create new sysfs entries directly > > (e.g. lo device) or indirectly (nf_conntrack creates a new kmem cache > > per each namespace, which, in turn, creates new sysfs entries), an easy > > way to reproduce this issue is by creating network namespace(s) from > > inside a kmem-active memory cgroup. > > > > Signed-off-by: Vladimir Davydov > > Man, that's nasty. For the kernfs part, > > Acked-by: Tejun Heo Thanks. > > Can you please repost this patch w/ Greg KH cc'd? OK. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/