From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760975AbdKQSh0 (ORCPT ); Fri, 17 Nov 2017 13:37:26 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:46869 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755316AbdKQShA (ORCPT ); Fri, 17 Nov 2017 13:37:00 -0500 Date: Fri, 17 Nov 2017 10:36:49 -0800 From: Christoph Hellwig To: Shakeel Butt Cc: Christoph Hellwig , Tetsuo Handa , Minchan Kim , Huang Ying , Mel Gorman , Vladimir Davydov , Michal Hocko , Johannes Weiner , Andrew Morton , Greg Thelen , Linux MM , LKML , "Paul E. McKenney" Subject: Re: [PATCH 1/2] mm,vmscan: Kill global shrinker lock. Message-ID: <20171117183649.GA14157@infradead.org> References: <1510609063-3327-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <20171117173521.GA21692@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.8.3 (2017-05-23) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 17, 2017 at 09:41:46AM -0800, Shakeel Butt wrote: > On Fri, Nov 17, 2017 at 9:35 AM, Christoph Hellwig wrote: > > On Tue, Nov 14, 2017 at 06:37:42AM +0900, Tetsuo Handa wrote: > >> Since do_shrink_slab() can reschedule, we cannot protect shrinker_list > >> using one RCU section. But using atomic_inc()/atomic_dec() for each > >> do_shrink_slab() call will not impact so much. > > > > But you could use SRCU.. > > I looked into that but was advised to not go through that route due to > SRCU behind the CONFIG_SRCU. However now I see the precedence of > "#ifdef CONFIG_SRCU" in drivers/base/core.c and I think if we can take > that route if even after Minchan's patch the issue persists. To be honest, I'd rather always require RCU then have core kernel code reinvent it. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 212E36B025F for ; Fri, 17 Nov 2017 13:37:01 -0500 (EST) Received: by mail-pf0-f200.google.com with SMTP id v2so3020995pfa.10 for ; Fri, 17 Nov 2017 10:37:01 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [65.50.211.133]) by mx.google.com with ESMTPS id j18si3109724pgn.474.2017.11.17.10.36.57 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Nov 2017 10:36:58 -0800 (PST) Date: Fri, 17 Nov 2017 10:36:49 -0800 From: Christoph Hellwig Subject: Re: [PATCH 1/2] mm,vmscan: Kill global shrinker lock. Message-ID: <20171117183649.GA14157@infradead.org> References: <1510609063-3327-1-git-send-email-penguin-kernel@I-love.SAKURA.ne.jp> <20171117173521.GA21692@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org List-ID: To: Shakeel Butt Cc: Christoph Hellwig , Tetsuo Handa , Minchan Kim , Huang Ying , Mel Gorman , Vladimir Davydov , Michal Hocko , Johannes Weiner , Andrew Morton , Greg Thelen , Linux MM , LKML , "Paul E. McKenney" On Fri, Nov 17, 2017 at 09:41:46AM -0800, Shakeel Butt wrote: > On Fri, Nov 17, 2017 at 9:35 AM, Christoph Hellwig wrote: > > On Tue, Nov 14, 2017 at 06:37:42AM +0900, Tetsuo Handa wrote: > >> Since do_shrink_slab() can reschedule, we cannot protect shrinker_list > >> using one RCU section. But using atomic_inc()/atomic_dec() for each > >> do_shrink_slab() call will not impact so much. > > > > But you could use SRCU.. > > I looked into that but was advised to not go through that route due to > SRCU behind the CONFIG_SRCU. However now I see the precedence of > "#ifdef CONFIG_SRCU" in drivers/base/core.c and I think if we can take > that route if even after Minchan's patch the issue persists. To be honest, I'd rather always require RCU then have core kernel code reinvent it. -- 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: email@kvack.org