All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Davydov <vdavydov@parallels.com>
To: hannes@cmpxchg.org, mhocko@suse.cz
Cc: akpm@linux-foundation.org, glommer@gmail.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	devel@openvz.org
Subject: Re: [PATCH -mm 00/12] kmemcg reparenting
Date: Tue, 4 Mar 2014 18:56:06 +0400	[thread overview]
Message-ID: <5315E986.7070608@parallels.com> (raw)
In-Reply-To: <cover.1393423762.git.vdavydov@parallels.com>

Hi Johannes, Michal

Could you please take a look at this set when you have time?

Thank you.

On 02/26/2014 07:05 PM, Vladimir Davydov wrote:
> Hi,
>
> During my recent attempt to push kmemcg shrinkers, I was pointed out
> that current kmemcg implementation has a serious design flaw - it lacks
> reparenting. Currently each memcg cache holds a css ref to its memcg and
> does not let it go until the cache is emptied. Although this approach is
> simple, it leads to memcgs hanging around for quite a long time after
> the death, which is ugly. Building something on top of that is
> unacceptable. So this patch set targets on implementing reparenting for
> kmemcg charges.
>
> [ for more details see the discussion thread:
>   https://lkml.org/lkml/2014/2/11/623 ]
>
> It is based on top of 3.14.0-rc4-mmotm and organized as follows:
>  - Patches 1-3 fix some nasty races in kmemcg implementation. I could
>    not let them live any longer, because they touch the code I'm going
>    to modify.
>  - Patches 4-6 prepare memcg_cache_params for reparenting.
>  - Patch 7 rework slab charging making it easier to track and therefore
>    reparent kmem charges, and patches 8-10 kill the old charging code.
>  - Patch 11 introduces kmemcg reparenting.
>  - Patch 12 is for slub. It fixes sysfs naming clashes that can arise
>    due to reparented caches.
>
> Please note that this patch set does not resolve all kmemcg-related
> issues - there are still plenty of them (e.g. "dangling" caches), but it
> is already big enough so I guess I'll address them later when this one
> is committed (if it will be committed at all, of course).
>
> Many thanks to Johannes Weiner, who proposed the idea and kindly
> outlined basic design principles.
>
> Thanks,
>
> Vladimir Davydov (12):
>   memcg: flush cache creation works before memcg cache destruction
>   memcg: fix race in memcg cache destruction path
>   memcg: fix root vs memcg cache destruction race
>   memcg: move slab caches list/mutex init to memcg creation
>   memcg: add pointer from memcg_cache_params to cache
>   memcg: keep all children of each root cache on a list
>   memcg: rework slab charging
>   memcg: do not charge kmalloc_large allocations
>   fork: do not charge thread_info to kmemcg
>   memcg: kill GFP_KMEMCG and stuff
>   memcg: reparent slab on css offline
>   slub: make sure all memcg caches have unique names on sysfs
>
>  include/linux/gfp.h             |    5 -
>  include/linux/memcontrol.h      |  133 ++-------
>  include/linux/slab.h            |   15 +-
>  include/linux/thread_info.h     |    2 -
>  include/trace/events/gfpflags.h |    1 -
>  kernel/fork.c                   |    4 +-
>  mm/memcontrol.c                 |  587 +++++++++++++++++----------------------
>  mm/page_alloc.c                 |   35 ---
>  mm/slab.c                       |   47 ++--
>  mm/slab.h                       |   17 +-
>  mm/slab_common.c                |  100 +++++--
>  mm/slub.c                       |   88 ++++--
>  12 files changed, 470 insertions(+), 564 deletions(-)
>

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Vladimir Davydov <vdavydov@parallels.com>
To: <hannes@cmpxchg.org>, <mhocko@suse.cz>
Cc: <akpm@linux-foundation.org>, <glommer@gmail.com>,
	<linux-kernel@vger.kernel.org>, <linux-mm@kvack.org>,
	<devel@openvz.org>
Subject: Re: [PATCH -mm 00/12] kmemcg reparenting
Date: Tue, 4 Mar 2014 18:56:06 +0400	[thread overview]
Message-ID: <5315E986.7070608@parallels.com> (raw)
In-Reply-To: <cover.1393423762.git.vdavydov@parallels.com>

Hi Johannes, Michal

Could you please take a look at this set when you have time?

Thank you.

On 02/26/2014 07:05 PM, Vladimir Davydov wrote:
> Hi,
>
> During my recent attempt to push kmemcg shrinkers, I was pointed out
> that current kmemcg implementation has a serious design flaw - it lacks
> reparenting. Currently each memcg cache holds a css ref to its memcg and
> does not let it go until the cache is emptied. Although this approach is
> simple, it leads to memcgs hanging around for quite a long time after
> the death, which is ugly. Building something on top of that is
> unacceptable. So this patch set targets on implementing reparenting for
> kmemcg charges.
>
> [ for more details see the discussion thread:
>   https://lkml.org/lkml/2014/2/11/623 ]
>
> It is based on top of 3.14.0-rc4-mmotm and organized as follows:
>  - Patches 1-3 fix some nasty races in kmemcg implementation. I could
>    not let them live any longer, because they touch the code I'm going
>    to modify.
>  - Patches 4-6 prepare memcg_cache_params for reparenting.
>  - Patch 7 rework slab charging making it easier to track and therefore
>    reparent kmem charges, and patches 8-10 kill the old charging code.
>  - Patch 11 introduces kmemcg reparenting.
>  - Patch 12 is for slub. It fixes sysfs naming clashes that can arise
>    due to reparented caches.
>
> Please note that this patch set does not resolve all kmemcg-related
> issues - there are still plenty of them (e.g. "dangling" caches), but it
> is already big enough so I guess I'll address them later when this one
> is committed (if it will be committed at all, of course).
>
> Many thanks to Johannes Weiner, who proposed the idea and kindly
> outlined basic design principles.
>
> Thanks,
>
> Vladimir Davydov (12):
>   memcg: flush cache creation works before memcg cache destruction
>   memcg: fix race in memcg cache destruction path
>   memcg: fix root vs memcg cache destruction race
>   memcg: move slab caches list/mutex init to memcg creation
>   memcg: add pointer from memcg_cache_params to cache
>   memcg: keep all children of each root cache on a list
>   memcg: rework slab charging
>   memcg: do not charge kmalloc_large allocations
>   fork: do not charge thread_info to kmemcg
>   memcg: kill GFP_KMEMCG and stuff
>   memcg: reparent slab on css offline
>   slub: make sure all memcg caches have unique names on sysfs
>
>  include/linux/gfp.h             |    5 -
>  include/linux/memcontrol.h      |  133 ++-------
>  include/linux/slab.h            |   15 +-
>  include/linux/thread_info.h     |    2 -
>  include/trace/events/gfpflags.h |    1 -
>  kernel/fork.c                   |    4 +-
>  mm/memcontrol.c                 |  587 +++++++++++++++++----------------------
>  mm/page_alloc.c                 |   35 ---
>  mm/slab.c                       |   47 ++--
>  mm/slab.h                       |   17 +-
>  mm/slab_common.c                |  100 +++++--
>  mm/slub.c                       |   88 ++++--
>  12 files changed, 470 insertions(+), 564 deletions(-)
>


  parent reply	other threads:[~2014-03-04 14:56 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 15:05 [PATCH -mm 00/12] kmemcg reparenting Vladimir Davydov
2014-02-26 15:05 ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 01/12] memcg: flush cache creation works before memcg cache destruction Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 02/12] memcg: fix race in memcg cache destruction path Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 03/12] memcg: fix root vs memcg cache destruction race Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 04/12] memcg: move slab caches list/mutex init to memcg creation Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 05/12] memcg: add pointer from memcg_cache_params to cache Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 06/12] memcg: keep all children of each root cache on a list Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 07/12] memcg: rework slab charging Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 08/12] memcg: do not charge kmalloc_large allocations Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 09/12] fork: do not charge thread_info to kmemcg Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 10/12] memcg: kill GFP_KMEMCG and stuff Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 11/12] memcg: reparent slab on css offline Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-02-26 15:05 ` [PATCH -mm 12/12] slub: make sure all memcg caches have unique names on sysfs Vladimir Davydov
2014-02-26 15:05   ` Vladimir Davydov
2014-03-04 14:56 ` Vladimir Davydov [this message]
2014-03-04 14:56   ` [PATCH -mm 00/12] kmemcg reparenting Vladimir Davydov
2014-03-04 15:21   ` Michal Hocko
2014-03-04 15:21     ` Michal Hocko
2014-03-05  5:54     ` Vladimir Davydov
2014-03-05  5:54       ` Vladimir Davydov

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=5315E986.7070608@parallels.com \
    --to=vdavydov@parallels.com \
    --cc=akpm@linux-foundation.org \
    --cc=devel@openvz.org \
    --cc=glommer@gmail.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    /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.