From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752620AbbJWNUB (ORCPT ); Fri, 23 Oct 2015 09:20:01 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:33613 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751307AbbJWNT7 (ORCPT ); Fri, 23 Oct 2015 09:19:59 -0400 Date: Fri, 23 Oct 2015 15:19:56 +0200 From: Michal Hocko To: Johannes Weiner Cc: "David S. Miller" , Andrew Morton , Vladimir Davydov , Tejun Heo , netdev@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/8] mm: memcontrol: account socket memory on unified hierarchy Message-ID: <20151023131956.GA15375@dhcp22.suse.cz> References: <1445487696-21545-1-git-send-email-hannes@cmpxchg.org> <1445487696-21545-6-git-send-email-hannes@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445487696-21545-6-git-send-email-hannes@cmpxchg.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 22-10-15 00:21:33, Johannes Weiner wrote: > Socket memory can be a significant share of overall memory consumed by > common workloads. In order to provide reasonable resource isolation > out-of-the-box in the unified hierarchy, this type of memory needs to > be accounted and tracked per default in the memory controller. What about users who do not want to pay an additional overhead for the accounting? How can they disable it? > Signed-off-by: Johannes Weiner [...] > @@ -5453,10 +5470,9 @@ void mem_cgroup_replace_page(struct page *oldpage, struct page *newpage) > commit_charge(newpage, memcg, true); > } > > -/* Writing them here to avoid exposing memcg's inner layout */ > -#if defined(CONFIG_INET) && defined(CONFIG_MEMCG_KMEM) > +#ifdef CONFIG_INET > > -DEFINE_STATIC_KEY_FALSE(mem_cgroup_sockets); > +DEFINE_STATIC_KEY_TRUE(mem_cgroup_sockets); AFAIU this means that the jump label is enabled by default. Is this intended when you enable it explicitly where needed? > > void sock_update_memcg(struct sock *sk) > { -- Michal Hocko SUSE Labs