Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4811333ybl; Mon, 9 Dec 2019 17:21:16 -0800 (PST) X-Google-Smtp-Source: APXvYqwfA72Z6RKWT94Zkw99uldeX0ejcCalidHnxnkQABY1DxQw+D9euqZm98G0wg8UVuVXkzle X-Received: by 2002:a05:6830:1353:: with SMTP id r19mr18874834otq.288.1575940876389; Mon, 09 Dec 2019 17:21:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575940876; cv=none; d=google.com; s=arc-20160816; b=ywPsTds5Nto18x3hro8IkhSYIGPkw9H9TqVRztCMs18w6nCyccNpwyV1arxBdyXaWT 2W05QJz6ZNnikt+Jqhy4EAiRTiOM0abfWhVTeTZM8BJviNMM+/EIMV348Tc76tChw259 Xgoohypv+EEmf6FxzGygHZG2nlrDArtIGpEOgBqO9p7cosjHRHJz/amzrMtPQtxGmNmL pmBGnxua0jhsxDU2OyfO47se7BHJfZbEJPVKtK6j0cRjqYwswfvIP6ympnmBaCy+dJrc JGQ5qJgPdgloduupjv6NgblDdSJwvCRT3Og3yWErm5nBDGlYAHjWiTnIFu/vj2uHG60N 0kdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=COTn48HYQPWsCM76UyKXPf6Py7zO5RjGPADW8x6FpBw=; b=e+89aqYSXMZ7JagfGy/XnrgA2F/8hN1jff2QniBlIb/WhtcwhYM7r5bY/gd2imXCRZ 0xIjfFxME+4DlGEVrbNft5rrWwlK0CdVOCyCGCCE5yHqxXqfxOLy8/HpT8QQoJJ+hCaU rrzd55Mr0QZCHzoqqi2+COCvXDu4Mb93+XJO29jG7CeiXxwNaE5bsWudFUlIWyLTB1l2 aMFm1aoAb0uEZF6sQYpgL2nr83N9x13qSwBN/GLVW8iLDe7urRqCYkl1QmcFA9wqGLem RTAvzNKtrXDNH32ElUOXZ+v0xHQMyMKDeLkbkbZHD/WGiVbLztXW0C1QGBWXHcRtFzyk OKyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si1110483ote.168.2019.12.09.17.20.55; Mon, 09 Dec 2019 17:21:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727448AbfLJBUw (ORCPT + 99 others); Mon, 9 Dec 2019 20:20:52 -0500 Received: from mail104.syd.optusnet.com.au ([211.29.132.246]:57265 "EHLO mail104.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727059AbfLJBUw (ORCPT ); Mon, 9 Dec 2019 20:20:52 -0500 Received: from dread.disaster.area (pa49-195-139-249.pa.nsw.optusnet.com.au [49.195.139.249]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 67CED7EA394; Tue, 10 Dec 2019 12:20:37 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1ieUCa-0006iz-IA; Tue, 10 Dec 2019 12:20:36 +1100 Date: Tue, 10 Dec 2019 12:20:36 +1100 From: Dave Chinner To: Shakeel Butt Cc: Andrey Ryabinin , Pavel Tikhomirov , Andrew Morton , LKML , Cgroups , Linux MM , Johannes Weiner , Michal Hocko , Vladimir Davydov , Roman Gushchin , Chris Down , Yang Shi , Tejun Heo , Thomas Gleixner , "Kirill A . Shutemov" , Konstantin Khorenko , Kirill Tkhai , Trond Myklebust , Anna Schumaker , "J. Bruce Fields" , Chuck Lever , linux-nfs@vger.kernel.org, Alexander Viro , linux-fsdevel Subject: Re: [PATCH] mm: fix hanging shrinker management on long do_shrink_slab Message-ID: <20191210012036.GB19213@dread.disaster.area> References: <20191129214541.3110-1-ptikhomirov@virtuozzo.com> <4e2d959a-0b0e-30aa-59b4-8e37728e9793@virtuozzo.com> <20191206020953.GS2695@dread.disaster.area> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.3 cv=LYdCFQXi c=1 sm=1 tr=0 a=KoypXv6BqLCQNZUs2nCMWg==:117 a=KoypXv6BqLCQNZUs2nCMWg==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=pxVhFHJ0LMsA:10 a=7-415B0cAAAA:8 a=x8hb-4BqU8MrIrHTnBsA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Fri, Dec 06, 2019 at 09:11:25AM -0800, Shakeel Butt wrote: > On Thu, Dec 5, 2019 at 6:10 PM Dave Chinner wrote: > > If a shrinker is blocking for a long time, then we need to > > work to fix the shrinker implementation because blocking is a much > > bigger problem than just register/unregister. > > > > Yes, we should be fixing the implementations of all shrinkers and yes > it is bigger issue but we can also fix register/unregister isolation > issue in parallel. Fixing all shrinkers would a tedious and long task > and we should not block fixing isolation issue on it. "fixing all shrinkers" is a bit of hyperbole - you've identified only one instance where blocking is causing you problems. Indeed, most shrinkers are already non-blocking and won't cause you any problems at all. > > IOWs, we already know that cycling a global rwsem on every > > individual shrinker invocation is going to cause noticable > > scalability problems. Hence I don't think that this sort of "cycle > > the global rwsem faster to reduce [un]register latency" solution is > > going to fly because of the runtime performance regressions it will > > introduce.... > > > > I agree with your scalability concern (though others would argue to > first demonstrate the issue before adding more sophisticated scalable > code). Look at the git history. We *know* this is a problem, so anyone arguing that we have to prove it can go take a long walk of a short plank.... > Most memory reclaim code is written without the performance or > scalability concern, maybe we should switch our thinking. I think there's a lot of core mm and other developers that would disagree with you there. With respect to shrinkers, we've been directly concerned about performance and scalability of the individual instances as well as the infrastructure for at least the last decade.... Cheers, Dave. -- Dave Chinner david@fromorbit.com