Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1496725
| From | "Doug Smythies" <dsmythies@telus.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH] mm/slab: fix kmemcg cache creation delayed issue |
| Date | 2016-10-06 18:10 +0200 |
| Message-ID | <spjp7-2A0-11@gated-at.bofh.it> (permalink) |
| References | <spjp7-2A0-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
It was my (limited) understanding that the subsequent 2 patch set
superseded this patch. Indeed, the 2 patch set seems to solve
both the SLAB and SLUB bug reports.
References:
https://bugzilla.kernel.org/show_bug.cgi?id=172981
https://bugzilla.kernel.org/show_bug.cgi?id=172991
https://patchwork.kernel.org/patch/9361853
https://patchwork.kernel.org/patch/9359271
On 2016.10.05 23:21 Joonsoo Kim wrote:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> There is a bug report that SLAB makes extreme load average due to
> over 2000 kworker thread.
>
> https://bugzilla.kernel.org/show_bug.cgi?id=172981
>
> This issue is caused by kmemcg feature that try to create new set of
> kmem_caches for each memcg. Recently, kmem_cache creation is slowed by
> synchronize_sched() and futher kmem_cache creation is also delayed
> since kmem_cache creation is synchronized by a global slab_mutex lock.
> So, the number of kworker that try to create kmem_cache increases quitely.
> synchronize_sched() is for lockless access to node's shared array but
> it's not needed when a new kmem_cache is created. So, this patch
> rules out that case.
>
> Fixes: 801faf0db894 ("mm/slab: lockless decision to grow cache")
> Cc: stable@vger.kernel.org
> Reported-by: Doug Smythies <dsmythies@telus.net>
> Tested-by: Doug Smythies <dsmythies@telus.net>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> ---
> mm/slab.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/slab.c b/mm/slab.c
> index 6508b4d..3c83c29 100644
> --- a/mm/slab.c
> +++ b/mm/slab.c
> @@ -961,7 +961,7 @@ static int setup_kmem_cache_node(struct kmem_cache *cachep,
> * guaranteed to be valid until irq is re-enabled, because it will be
> * freed after synchronize_sched().
> */
> - if (force_change)
> + if (old_shared && force_change)
> synchronize_sched();
>
> fail:
> --
> 1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
RE: [PATCH] mm/slab: fix kmemcg cache creation delayed issue "Doug Smythies" <dsmythies@telus.net> - 2016-10-06 18:10 +0200
Re: [PATCH] mm/slab: fix kmemcg cache creation delayed issue Joonsoo Kim <iamjoonsoo.kim@lge.com> - 2016-10-07 07:30 +0200
Re: [PATCH] mm/slab: fix kmemcg cache creation delayed issue Michal Hocko <mhocko@kernel.org> - 2016-10-07 10:30 +0200
csiph-web