Re: [PATCH 12/14] xfs: use background worker pool when transactions can't get free space

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 04, 2021 at 07:07:28PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> In xfs_trans_alloc, if the block reservation call returns ENOSPC, we
> call xfs_blockgc_free_space with a NULL icwalk structure to try to free
> space.  Each frontend thread that encounters this situation starts its
> own walk of the inode cache to see if it can find anything, which is
> wasteful since we don't have any additional selection criteria.  For
> this one common case, create a function that reschedules all pending
> background work immediately and flushes the workqueue so that the scan
> can run in parallel.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_icache.c |   28 ++++++++++++++++++++++++++++
>  fs/xfs/xfs_icache.h |    1 +
>  fs/xfs/xfs_trace.h  |    1 +
>  fs/xfs/xfs_trans.c  |    5 +----
>  4 files changed, 31 insertions(+), 4 deletions(-)

Yup, looks a bit more efficient to do it this way.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux