xfs
[Top] [All Lists]

Re: [PATCH 1/3] xfs: Use delayed write for inodes rather than async

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/3] xfs: Use delayed write for inodes rather than async
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Fri, 8 Jan 2010 06:14:32 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20100108110524.GC8718@xxxxxxxxxxxxxxxx>
References: <1262649861-28530-1-git-send-email-david@xxxxxxxxxxxxx> <1262649861-28530-2-git-send-email-david@xxxxxxxxxxxxx> <20100108103620.GA11769@xxxxxxxxxxxxx> <20100108110524.GC8718@xxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.19 (2009-01-05)
On Fri, Jan 08, 2010 at 10:05:24PM +1100, Dave Chinner wrote:
> I don't think it really matters for the existing code as we do the
> xfs_flush_buftarg(SYNC_WAIT) in the loop below which will push out
> inodes flushed during reclaim.

True.

> Hmmm - given that xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI) can skip
> inodes, there probably should be a sync reclaim done in the flush
> loop to ensure we've caught them.

Indeed, the skipping behaviour is rather confusing and needs to be taken
care off.

> Yes - xfs_iflush_int() gets called only from xfs_iflush() and
> xfs_iflush_cluster() and both check first.

Ok.

> The delayed write flush can skip inodes, so we need to do a sync
> flush to guarantee that we reclaim all dirty inodes. The flush is done
> first so the sync flush doesn't block on the flush locks for too
> long for inodes that are already locked for delwri flushing.
> Perhaps a:
> 
>       xfs_reclaim_inodes(mp, XFS_IFLUSH_DELWRI);
>       XFS_bflush(mp->m_ddev_targp);
>       xfs_reclaim_inodes(mp, XFS_IFLUSH_SYNC);
> 
> sequence would be better here?

I guess that would be optimal.  Maybe with a little comment explaining
why we do it.

<Prev in Thread] Current Thread [Next in Thread>