From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shards.monkeyblade.net ([184.105.139.130]:53010 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933521AbeCGPTk (ORCPT ); Wed, 7 Mar 2018 10:19:40 -0500 Date: Wed, 07 Mar 2018 10:19:38 -0500 (EST) Message-Id: <20180307.101938.1130725153922128346.davem@davemloft.net> To: ktkhai@virtuozzo.com Cc: avagin@virtuozzo.com, ebiederm@xmission.com, fw@strlen.de, nicolas.dichtel@6wind.com, roman.kapl@sysgo.com, netdev@vger.kernel.org Subject: Re: [PATCH net-next] net: Make account struct net to memcg From: David Miller In-Reply-To: <151990693811.1834.4667591561054337598.stgit@localhost.localdomain> References: <151990693811.1834.4667591561054337598.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org List-ID: From: Kirill Tkhai Date: Thu, 01 Mar 2018 15:23:28 +0300 > The patch adds SLAB_ACCOUNT to flags of net_cachep cache, > which enables accounting of struct net memory to memcg kmem. > Since number of net_namespaces may be significant, user > want to know, how much there were consumed, and control. > > Note, that we do not account net_generic to the same memcg, > where net was accounted, moreover, we don't do this at all (*). > We do not want the situation, when single memcg memory deficit > prevents us to register new pernet_operations. > > (*)Even despite there is !current process accounting already > available in linux-next. See kmalloc_memcg() there for the details. > > Signed-off-by: Kirill Tkhai Applied, thank you.