Re: [PATCH 14/20] xfs: parallelize inode inactivation

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

 



On Thu, Jul 29, 2021 at 11:45:10AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Split the inode inactivation work into per-AG work items so that we can
> take advantage of parallelization.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  fs/xfs/libxfs/xfs_ag.c |   12 ++++++-
>  fs/xfs/libxfs/xfs_ag.h |   10 +++++
>  fs/xfs/xfs_icache.c    |   88 ++++++++++++++++++++++++++++--------------------
>  fs/xfs/xfs_icache.h    |    2 +
>  fs/xfs/xfs_mount.c     |    9 +----
>  fs/xfs/xfs_mount.h     |    8 ----
>  fs/xfs/xfs_super.c     |    2 -
>  fs/xfs/xfs_trace.h     |   82 ++++++++++++++++++++++++++++++++-------------
>  8 files changed, 134 insertions(+), 79 deletions(-)

....

> --- a/fs/xfs/xfs_icache.c
> +++ b/fs/xfs/xfs_icache.c
> @@ -420,9 +420,11 @@ xfs_blockgc_queue(
>   */
>  static void
>  xfs_inodegc_queue(
> -	struct xfs_mount        *mp,
> +	struct xfs_perag	*pag,
>  	struct xfs_inode	*ip)
>  {
> +	struct xfs_mount        *mp = pag->pag_mount;
> +
>  	if (!test_bit(XFS_OPFLAG_INODEGC_RUNNING_BIT, &mp->m_opflags))
>  		return;
>  
> @@ -431,8 +433,8 @@ xfs_inodegc_queue(
>  		unsigned int	delay;
>  
>  		delay = xfs_gc_delay_ms(mp, ip, XFS_ICI_INODEGC_TAG);
> -		trace_xfs_inodegc_queue(mp, delay);
> -		queue_delayed_work(mp->m_gc_workqueue, &mp->m_inodegc_work,
> +		trace_xfs_inodegc_queue(pag, delay);
> +		queue_delayed_work(mp->m_gc_workqueue, &pag->pag_inodegc_work,
>  				msecs_to_jiffies(delay));
>  	}
>  	rcu_read_unlock();

I think you missed this change in xfs_inodegc_queue():

@@ -492,7 +492,7 @@ xfs_inodegc_queue(
 		return;
 
 	rcu_read_lock();
-	if (radix_tree_tagged(&mp->m_perag_tree, XFS_ICI_INODEGC_TAG)) {
+	if (radix_tree_tagged(&pag->pag_ici_root, XFS_ICI_INODEGC_TAG)) {
 		unsigned int    delay;
 
 		delay = xfs_gc_delay_ms(pag, ip, XFS_ICI_INODEGC_TAG);

Cheers,

Dave.

-- 
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