Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964795AbcJFQCe (ORCPT ); Thu, 6 Oct 2016 12:02:34 -0400 Received: from cmta16.telus.net ([209.171.16.89]:41382 "EHLO cmta16.telus.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754595AbcJFQC3 (ORCPT ); Thu, 6 Oct 2016 12:02:29 -0400 X-Authority-Analysis: v=2.2 cv=Dse5wC3+ c=1 sm=1 tr=0 a=zJWegnE7BH9C0Gl4FFgQyA==:117 a=zJWegnE7BH9C0Gl4FFgQyA==:17 a=Pyq9K9CWowscuQLKlpiwfMBGOR0=:19 a=kj9zAlcOel0A:10 a=VwQbUJbxAAAA:8 a=57SyGIRnAAAA:8 a=aatUQebYAAAA:8 a=BLxvtUWy1S5prIQ6ayAA:9 a=q3-wohdXUm0oVpw6:21 a=v1tQ8IXabtXb74-7:21 a=CjuIK1q_8ugA:10 a=AjGcO6oz07-iQ99wixmX:22 a=YzT4AsKTxtEdF6UtD8mD:22 a=7715FyvI7WU-l6oqrZBK:22 From: "Doug Smythies" To: , "'Andrew Morton'" Cc: "'Christoph Lameter'" , "'Pekka Enberg'" , "'David Rientjes'" , "'Johannes Weiner'" , "'Vladimir Davydov'" , , , "'Joonsoo Kim'" , References: s238betearAHps239b0z1X In-Reply-To: s238betearAHps239b0z1X Subject: RE: [PATCH] mm/slab: fix kmemcg cache creation delayed issue Date: Thu, 6 Oct 2016 09:02:00 -0700 Message-ID: <002b01d21fea$fb0bab60$f1230220$@net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AdIfmc5fJuUTRAXZQO6b/OX4dX6HDAATxZ9w Content-Language: en-ca X-CMAE-Envelope: MS4wfE8hoqXr6w83I3wtO8ogbxiYU2q/sn/02n8YSbfqK5Kt78f5fBzKGYQSXZuzSKdCIbsuyhjjz77uN7pyPcWrsLWOZiTcs3mlCC+5/gI0g0uFdNuNMB2w VqJqmOm9ELKIPrhggvvdFAVf86uaecJChCl7oI06T0BlzoFuqLQfkm9ZDZUYJTlshOqBsuPmhXlmw9j5ThFSQRjckAIgSZpTJOS8XcMQEBSEDeOk6TmXrePM NDTMBlTZXBKkZm3qLpi0PuPuZ1q8NhaYnWTKvMgFg2oTnqWrVzPlo37U3HPX2uiIVeDX0td1o31WYBXlrrYMlY/alTEr0ePVcTD2iagZtbDUXjakIMx2qc67 IqIzHU/1q45WaddWO1qJ/Og5cJ0sBCMfLtF3tifVXAWyijvc21tGNy6sDNZt6Kozsjbx7bcYMPfYUnaP68EteG3OCciMtxJ6xmgeQT616cS9T/+yTskFk+LF mtkirFZYPtaI+eSx Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1875 Lines: 53 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 > > 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 > Tested-by: Doug Smythies > Signed-off-by: Joonsoo Kim > --- > 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