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 <dchinner@xxxxxxxxxx> > > > > 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 <dchinner@xxxxxxxxxx> > > --- > > 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@xxxxxxxxxxxxx