From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:39352 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753182AbcKGQ0O (ORCPT ); Mon, 7 Nov 2016 11:26:14 -0500 Subject: Patch "mm/slab: fix kmemcg cache creation delayed issue" has been added to the 4.8-stable tree To: iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, cl@linux.com, dsmythies@telus.net, gregkh@linuxfoundation.org, penberg@kernel.org, rientjes@google.com, torvalds@linux-foundation.org Cc: , From: Date: Mon, 07 Nov 2016 17:24:21 +0100 Message-ID: <1478535861117194@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled mm/slab: fix kmemcg cache creation delayed issue to the 4.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: mm-slab-fix-kmemcg-cache-creation-delayed-issue.patch and it can be found in the queue-4.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 86d9f48534e800e4d62cdc1b5aaf539f4c1d47d6 Mon Sep 17 00:00:00 2001 From: Joonsoo Kim Date: Thu, 27 Oct 2016 17:46:18 -0700 Subject: mm/slab: fix kmemcg cache creation delayed issue From: Joonsoo Kim commit 86d9f48534e800e4d62cdc1b5aaf539f4c1d47d6 upstream. 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 quietly. 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") Link: http://lkml.kernel.org/r/1475734855-4837-1-git-send-email-iamjoonsoo.kim@lge.com Reported-by: Doug Smythies Tested-by: Doug Smythies Signed-off-by: Joonsoo Kim Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- mm/slab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/mm/slab.c +++ b/mm/slab.c @@ -964,7 +964,7 @@ static int setup_kmem_cache_node(struct * 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: Patches currently in stable-queue which might be from iamjoonsoo.kim@lge.com are queue-4.8/mm-slab-fix-kmemcg-cache-creation-delayed-issue.patch