Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936062AbcJFG1M (ORCPT ); Thu, 6 Oct 2016 02:27:12 -0400 Received: from LGEAMRELO12.lge.com ([156.147.23.52]:40477 "EHLO lgeamrelo12.lge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934036AbcJFG1L (ORCPT ); Thu, 6 Oct 2016 02:27:11 -0400 X-Original-SENDERIP: 156.147.1.126 X-Original-MAILFROM: iamjoonsoo.kim@lge.com X-Original-SENDERIP: 10.177.222.138 X-Original-MAILFROM: iamjoonsoo.kim@lge.com Date: Thu, 6 Oct 2016 15:27:08 +0900 From: Joonsoo Kim To: Vladimir Davydov Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christoph Lameter , David Rientjes , Johannes Weiner , Michal Hocko , Pekka Enberg , Doug Smythies Subject: Re: [PATCH 2/2] slub: move synchronize_sched out of slab_mutex on shrink Message-ID: <20161006062708.GA2525@js1304-P5Q-DELUXE> References: <0a10d71ecae3db00fb4421bcd3f82bcc911f4be4.1475329751.git.vdavydov.dev@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a10d71ecae3db00fb4421bcd3f82bcc911f4be4.1475329751.git.vdavydov.dev@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1199 Lines: 29 Ccing Doug, original reporter. On Sat, Oct 01, 2016 at 04:56:48PM +0300, Vladimir Davydov wrote: > synchronize_sched() is a heavy operation and calling it per each cache > owned by a memory cgroup being destroyed may take quite some time. What > is worse, it's currently called under the slab_mutex, stalling all works > doing cache creation/destruction. > > Actually, there isn't much point in calling synchronize_sched() for each > cache - it's enough to call it just once - after setting cpu_partial for > all caches and before shrinking them. This way, we can also move it out > of the slab_mutex, which we have to hold for iterating over the slab > cache list. > > Link: https://bugzilla.kernel.org/show_bug.cgi?id=172991 > Signed-off-by: Vladimir Davydov > Reported-by: Doug Smythies > Cc: Christoph Lameter > Cc: David Rientjes > Cc: Johannes Weiner > Cc: Joonsoo Kim > Cc: Michal Hocko > Cc: Pekka Enberg Acked-by: Joonsoo Kim These two patches should be sent to stable. Isn't it? Thanks.