From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752484AbbLIVDa (ORCPT ); Wed, 9 Dec 2015 16:03:30 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:53962 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751603AbbLIVD2 (ORCPT ); Wed, 9 Dec 2015 16:03:28 -0500 From: Arnd Bergmann To: Johannes Weiner Cc: Andrew Morton , linux-mm@kvack.org, netdev@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Davydov Subject: Re: [PATCH] mm: memcontrol: MEMCG no longer works with SLOB Date: Wed, 09 Dec 2015 22:03:06 +0100 Message-ID: <1555665.xW941mUeCs@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <20151209200107.GA17409@cmpxchg.org> References: <1449588624-9220-1-git-send-email-hannes@cmpxchg.org> <1558902.EBTjGmY9S2@wuerfel> <20151209200107.GA17409@cmpxchg.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:FJWDVD6TtcvAsNRTk6URJpdnRFAfWvFXzVG740gbsezZr3YmIfi oteikFT8yj6LbBtuR33aX1fkJRAEQEtPcQh0Vit7OMy4L9SjlHHMJuaIgu0DXF/cwKuM/77 Ok2U6NrnusKh1D3l1Nc1swTOzOV+wlPQ/8mF6kunmw37bKMuM7bH+NNdbL/mExNuqAcj7bA gr2j4Ujk1DEWRp1XnlSPQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:+jaR+jiIeTA=:+DR47DOdirrqAt8xh9sexp MCYNPLR2WO+mtBLAi6YE+vGJ5/YCx1aGbHykRxsAmUjWRSc+oUJHu3vmP86vJ+q9aUy8j9HCh WWnOqCylUHs4RNz/YXVg+KQizeRp1Qu1Y2wk4q3jlGgreBxjN20AJCzIl8jS5yT3tdQWKtXrB bt6+TQdPwACpsjjDm6si7wfGLYK8dSI03K366dXJHSxDcF0kZDqitZHZ6hY/BVlgJWIycKyX7 Pr5sFdjWkowmhFv+JbvnlQFPvVOABp9wEzFnNhBhU7lk4Sjpv3VK5z2fY9A4cOwNSd5T4sSS1 IVGSYjCYYQAwvZNIJs2nhy7OTAN/6m2DKn9hjgKXIRbQq8tJnEkWvlyFqwraqGEgRBzqVspXL VsBcdqC3I+NrKHRKc7EkrBfXtO8Ce1xLCRY4MZaxLtrthGf/j8CJupJAYmwGEEcLefBR9KC6o 5mbeb6QkbwJVXWGlhBy/6EFLAvXT5aCrHPwscozpAOM1vP/4t3iF0392L7kSiIfgstgfkV6xb Dzk0gT1SqeBGIQk2RKkrvxfCnJGHHkhClQxz6S/xMYFGYP8Es7ZMC5Kt89b9TNPkR7xq10mw3 sfVg+XYegmdh4guOpOrn8EB2FSJIvQPgo13YjzEaMaN2yUYTZXUDayoMRf7+0hDEA2SWqXEF7 EZyeF0n70AFWuatOJHBQhcdfuNqDKqSqWcDQfibEpIK/Mhr9sjdI2eXcZ7HQh76WwO2oo8x9g SpBPxKXKfb+N46eA Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 09 December 2015 15:01:07 Johannes Weiner wrote: > On Wed, Dec 09, 2015 at 05:32:39PM +0100, Arnd Bergmann wrote: > > The change to move the kmem accounting into the normal memcg > > code means we can no longer use memcg with slob, which lacks > > the memcg_params member in its struct kmem_cache: > > > > ../mm/slab.h: In function 'is_root_cache': > > ../mm/slab.h:187:10: error: 'struct kmem_cache' has no member named 'memcg_params' > > > > This enforces the new dependency in Kconfig. Alternatively, > > we could change the slob code to allow using MEMCG. > > I'm curious, was this a random config or do you actually use > CONFIG_SLOB && CONFIG_MEMCG? Just a randconfig build, I do a lot of those to check for ARM specific regressions. > index 5adec08..0b3ec4b 100644 > --- a/mm/slab.h > +++ b/mm/slab.h > @@ -25,6 +25,9 @@ struct kmem_cache { > int refcount; /* Use counter */ > void (*ctor)(void *); /* Called on object slot creation */ > struct list_head list; /* List of all slab caches on the system */ > +#ifdef CONFIG_MEMCG > + struct memcg_cache_params memcg_params; > +#endif > }; > > #endif /* CONFIG_SLOB */ This was my first approach to the problem, and it solves the build issues, I just wasn't sure if it works as expected. Arnd From mboxrd@z Thu Jan 1 00:00:00 1970 From: Arnd Bergmann Subject: Re: [PATCH] mm: memcontrol: MEMCG no longer works with SLOB Date: Wed, 09 Dec 2015 22:03:06 +0100 Message-ID: <1555665.xW941mUeCs@wuerfel> References: <1449588624-9220-1-git-send-email-hannes@cmpxchg.org> <1558902.EBTjGmY9S2@wuerfel> <20151209200107.GA17409@cmpxchg.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: Andrew Morton , linux-mm@kvack.org, netdev@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, Vladimir Davydov To: Johannes Weiner Return-path: In-Reply-To: <20151209200107.GA17409@cmpxchg.org> Sender: owner-linux-mm@kvack.org List-Id: netdev.vger.kernel.org On Wednesday 09 December 2015 15:01:07 Johannes Weiner wrote: > On Wed, Dec 09, 2015 at 05:32:39PM +0100, Arnd Bergmann wrote: > > The change to move the kmem accounting into the normal memcg > > code means we can no longer use memcg with slob, which lacks > > the memcg_params member in its struct kmem_cache: > > > > ../mm/slab.h: In function 'is_root_cache': > > ../mm/slab.h:187:10: error: 'struct kmem_cache' has no member named 'memcg_params' > > > > This enforces the new dependency in Kconfig. Alternatively, > > we could change the slob code to allow using MEMCG. > > I'm curious, was this a random config or do you actually use > CONFIG_SLOB && CONFIG_MEMCG? Just a randconfig build, I do a lot of those to check for ARM specific regressions. > index 5adec08..0b3ec4b 100644 > --- a/mm/slab.h > +++ b/mm/slab.h > @@ -25,6 +25,9 @@ struct kmem_cache { > int refcount; /* Use counter */ > void (*ctor)(void *); /* Called on object slot creation */ > struct list_head list; /* List of all slab caches on the system */ > +#ifdef CONFIG_MEMCG > + struct memcg_cache_params memcg_params; > +#endif > }; > > #endif /* CONFIG_SLOB */ This was my first approach to the problem, and it solves the build issues, I just wasn't sure if it works as expected. Arnd -- 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: email@kvack.org