All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, netdev@vger.kernel.org,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vladimir Davydov <vdavydov@virtuozzo.com>
Subject: Re: [PATCH] mm: memcontrol: MEMCG no longer works with SLOB
Date: Wed, 09 Dec 2015 22:03:06 +0100	[thread overview]
Message-ID: <1555665.xW941mUeCs@wuerfel> (raw)
In-Reply-To: <20151209200107.GA17409@cmpxchg.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

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, netdev@vger.kernel.org,
	cgroups@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vladimir Davydov <vdavydov@virtuozzo.com>
Subject: Re: [PATCH] mm: memcontrol: MEMCG no longer works with SLOB
Date: Wed, 09 Dec 2015 22:03:06 +0100	[thread overview]
Message-ID: <1555665.xW941mUeCs@wuerfel> (raw)
In-Reply-To: <20151209200107.GA17409@cmpxchg.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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2015-12-09 21:03 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-08 15:30 [PATCH 00/14] mm: memcontrol: account socket memory in unified hierarchy v4-RESEND Johannes Weiner
2015-12-08 15:30 ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 01/14] mm: memcontrol: export root_mem_cgroup Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 02/14] net: tcp_memcontrol: properly detect ancestor socket pressure Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 03/14] net: tcp_memcontrol: remove bogus hierarchy pressure propagation Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 04/14] net: tcp_memcontrol: protect all tcp_memcontrol calls by jump-label Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 05/14] net: tcp_memcontrol: remove dead per-memcg count of allocated sockets Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 06/14] net: tcp_memcontrol: simplify the per-memcg limit access Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 07/14] net: tcp_memcontrol: sanitize tcp memory accounting callbacks Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 08/14] net: tcp_memcontrol: simplify linkage between socket and page counter Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 09/14] mm: memcontrol: generalize the socket accounting jump label Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 10/14] mm: memcontrol: do not account memory+swap on unified hierarchy Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 11/14] mm: memcontrol: move socket code for unified hierarchy accounting Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 12/14] mm: memcontrol: account socket memory in unified hierarchy memory controller Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-15 19:50   ` Michal Hocko
2015-12-15 19:50     ` Michal Hocko
2015-12-08 15:30 ` [PATCH 13/14] mm: memcontrol: hook up vmpressure to socket pressure Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 15:30 ` [PATCH 14/14] mm: memcontrol: switch to the updated jump-label API Johannes Weiner
2015-12-08 15:30   ` Johannes Weiner
2015-12-08 16:28   ` David Miller
2015-12-08 16:28     ` David Miller
2015-12-08 16:28 ` [PATCH 00/14] mm: memcontrol: account socket memory in unified hierarchy v4-RESEND David Miller
2015-12-08 16:28   ` David Miller
2015-12-09 16:31 ` Arnd Bergmann
2015-12-09 16:31   ` Arnd Bergmann
2015-12-09 16:31   ` Arnd Bergmann
2015-12-09 16:32   ` [PATCH] mm: memcontrol: only manage socket pressure for CONFIG_INET Arnd Bergmann
2015-12-09 16:32     ` Arnd Bergmann
2015-12-09 16:32     ` Arnd Bergmann
2015-12-09 18:58     ` Johannes Weiner
2015-12-09 18:58       ` Johannes Weiner
2015-12-09 22:28       ` Andrew Morton
2015-12-09 22:28         ` Andrew Morton
2015-12-09 22:28         ` Andrew Morton
2015-12-09 23:05         ` Johannes Weiner
2015-12-09 23:05           ` Johannes Weiner
2015-12-09 23:13           ` Andrew Morton
2015-12-09 23:13             ` Andrew Morton
2016-01-22  3:25             ` Masanari Iida
2016-01-22  3:25               ` Masanari Iida
2015-12-09 16:32   ` [PATCH] mm: memcontrol: MEMCG no longer works with SLOB Arnd Bergmann
2015-12-09 16:32     ` Arnd Bergmann
2015-12-09 20:01     ` Johannes Weiner
2015-12-09 20:01       ` Johannes Weiner
2015-12-09 20:01       ` Johannes Weiner
2015-12-09 21:03       ` Arnd Bergmann [this message]
2015-12-09 21:03         ` Arnd Bergmann
2015-12-10 11:24       ` Vladimir Davydov
2015-12-10 11:24         ` Vladimir Davydov
2015-12-10 11:24         ` Vladimir Davydov
2015-12-10 11:24         ` Vladimir Davydov
2015-12-09 18:17   ` [PATCH 00/14] mm: memcontrol: account socket memory in unified hierarchy v4-RESEND Johannes Weiner
2015-12-09 18:17     ` Johannes Weiner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1555665.xW941mUeCs@wuerfel \
    --to=arnd@arndb.de \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=netdev@vger.kernel.org \
    --cc=vdavydov@virtuozzo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.