Re: [PATCH 2/4] xfs: check that per-cpu inodegc workers actually run on that cpu

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

 



On Thu, Apr 27, 2023 at 03:49:31PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@xxxxxxxxxx>
> 
> Now that we've allegedly worked out the problem of the per-cpu inodegc
> workers being scheduled on the wrong cpu, let's put in a debugging knob
> to let us know if a worker ever gets mis-scheduled again.
> 
> Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
> ---
>  fs/xfs/xfs_icache.c |    2 ++
>  fs/xfs/xfs_mount.h  |    3 +++
>  fs/xfs/xfs_super.c  |    3 +++
>  3 files changed, 8 insertions(+)
> 
> 
> diff --git a/fs/xfs/xfs_icache.c b/fs/xfs/xfs_icache.c
> index 58712113d5d6..4b63c065ef19 100644
> --- a/fs/xfs/xfs_icache.c
> +++ b/fs/xfs/xfs_icache.c
> @@ -1856,6 +1856,8 @@ xfs_inodegc_worker(
>  	struct xfs_inode	*ip, *n;
>  	unsigned int		nofs_flag;
>  
> +	ASSERT(gc->cpu == smp_processor_id());

I kinda wish there was a reverse "per cpu item to cpu" reverse
resolution function, but this is only debugging code so it'll do.

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