Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3732277ybc; Thu, 14 Nov 2019 13:55:39 -0800 (PST) X-Google-Smtp-Source: APXvYqwYSpGcXdtiZO3g2hew/S7WD1AyfM9dChzH4qfO+Vj8QBBJyGXTdWbedaV8d0llAkQ16RJp X-Received: by 2002:a5d:530f:: with SMTP id e15mr3369283wrv.119.1573768539119; Thu, 14 Nov 2019 13:55:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573768539; cv=none; d=google.com; s=arc-20160816; b=Uw60tyrJA2ArVS30QkH2/Ua116Vw0c8lS0GsKYJTZtxn7ajuUCotDw0zR6Py9OgAWA uSaOHsUJPdkmlJiO0FcC7hqvoDjsvWJ0W20/SJa1nq40Y1POK7MyCTxj18R+kl/yG+HC Sp97Y5CyT3/ib9g3QY2bykXgkQpT/zaUnp2Az79iVplR309LZtBVkCoJhU9k2LcDTuaP qYZMEimfgPmMzOfW4M6G91fItXQnLF3weiteoJS7cGTva6PNKoV7YCKMmWukPLTpIiHt 70I/UFQRacCbFBXaRf2ktfS+gnv2P/RO8/ViLu7wjti7P3b6H+TYIpu47p/SUDxjHyKn D8sw== 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=B4eHTnPRF/kixeTXSyAXNTgSOAaatXHzP17VzTJT4GI=; b=xicTvUHnKxJXPc8xpXBt6xaFdbNEnopy2Isk+bvyy5/cnMzS1duvpT2qO3HDJ30lpr fWgBO5HvuWnqaUUrectTra8NxhKMVrv5if2VRzwp2zHgX01/qkt4eEfnLQ9Pms3Tb/8e wJ7YEr7o0Ijtg+c7isZ2gS8uEpz4bdRi/JeqgSmae/q7IwMvUuZBsezjLC7g9oKvYR5z X7wv97+r39yWPKdtH5FytUL1iuNOutdSEBXasiMixYtXs7lNnu44iEwUkM40yWMCXsFc gIV7IF8i+EGf67gAR4WBpZTxV+nHOC407UqZWTgJRz7MLhJjt0po00XSG8qu2cVx+lhI kVMQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 o25si4342339ejc.52.2019.11.14.13.55.13; Thu, 14 Nov 2019 13:55:39 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727069AbfKNVxy (ORCPT + 99 others); Thu, 14 Nov 2019 16:53:54 -0500 Received: from mail105.syd.optusnet.com.au ([211.29.132.249]:46844 "EHLO mail105.syd.optusnet.com.au" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726812AbfKNVxx (ORCPT ); Thu, 14 Nov 2019 16:53:53 -0500 Received: from dread.disaster.area (pa49-181-255-80.pa.nsw.optusnet.com.au [49.181.255.80]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id CCFE13A235F; Fri, 15 Nov 2019 08:53:50 +1100 (AEDT) Received: from dave by dread.disaster.area with local (Exim 4.92.3) (envelope-from ) id 1iVN3m-0003gD-4F; Fri, 15 Nov 2019 08:53:50 +1100 Date: Fri, 15 Nov 2019 08:53:50 +1100 From: Dave Chinner To: Brian Foster Cc: linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 26/28] xfs: use xfs_ail_push_all in xfs_reclaim_inodes Message-ID: <20191114215350.GI4614@dread.disaster.area> References: <20191031234618.15403-1-david@fromorbit.com> <20191031234618.15403-27-david@fromorbit.com> <20191106172215.GD37080@bfoster> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191106172215.GD37080@bfoster> User-Agent: Mutt/1.10.1 (2018-07-13) X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=G6BsK5s5 c=1 sm=1 tr=0 a=XqaD5fcB6dAc7xyKljs8OA==:117 a=XqaD5fcB6dAc7xyKljs8OA==:17 a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=kj9zAlcOel0A:10 a=MeAgGD-zjQ4A:10 a=20KFwNOVAAAA:8 a=7-415B0cAAAA:8 a=6BWFxZc-ePnZL1BRICgA:9 a=CjuIK1q_8ugA:10 a=biEYGPWJfzWAr4FL6Ov7:22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 06, 2019 at 12:22:15PM -0500, Brian Foster wrote: > On Fri, Nov 01, 2019 at 10:46:16AM +1100, Dave Chinner wrote: > > From: Dave Chinner > > > > If we are reclaiming all inodes, it is likely we need to flush the > > entire AIL to do that. We have mechanisms to do that without needing > > to push to a specific LSN. > > > > Convert xfs_relaim_all_inodes() to use xfs_ail_push_all variant so > > we can get rid of the hacky xfs_ail_push_sync() scaffolding we used > > to support the intermediate stages of the non-blocking reclaim > > changeset. > > > > Signed-off-by: Dave Chinner > > --- > > fs/xfs/xfs_icache.c | 17 +++++++++++------ > > fs/xfs/xfs_trans_ail.c | 32 -------------------------------- > > fs/xfs/xfs_trans_priv.h | 2 -- > > 3 files changed, 11 insertions(+), 40 deletions(-) > > > > diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c > > index 71a729e29260..11bf4768d491 100644 > > --- a/fs/xfs/xfs_icache.c > > +++ b/fs/xfs/xfs_icache.c > ... > > @@ -1066,13 +1074,10 @@ xfs_reclaim_all_inodes( > > xfs_inode_reclaim_isolate, &ra, to_free); > > xfs_dispose_inodes(&ra.freeable); > > > > - if (freed == 0) { > > + if (freed == 0) > > xfs_log_force(mp, XFS_LOG_SYNC); > > - xfs_ail_push_all(mp->m_ail); > > - } else if (ra.lowest_lsn != NULLCOMMITLSN) { > > - xfs_ail_push_sync(mp->m_ail, ra.lowest_lsn); > > - } > > - cond_resched(); > > + else if (ra.dirty_skipped) > > + congestion_wait(BLK_RW_ASYNC, HZ/10); > > Why not use xfs_ail_push_all_sync() in this function and skip the direct > stall? This is only used in the unmount and quiesce paths so the big > hammer approach seems reasonable. Ok, that's a good simplification :) -Dave. -- Dave Chinner david@fromorbit.com