xfs
[Top] [All Lists]

Re: [PATCH] xfs: optimize fsync on directories

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: optimize fsync on directories
From: Alex Elder <aelder@xxxxxxx>
Date: Tue, 4 Oct 2011 21:23:40 -0500
Cc: <xfs@xxxxxxxxxxx>
In-reply-to: <20111002142516.GA6361@xxxxxxxxxxxxx>
References: <20111002142516.GA6361@xxxxxxxxxxxxx>
Reply-to: <aelder@xxxxxxx>
On Sun, 2011-10-02 at 10:25 -0400, Christoph Hellwig wrote:
> Directories are only updated transactionally, which means fsync only
> needs to flush the log the inode is currently dirty, but not bother
> with checking for dirty data, non-transaction updates, an most importanly
> doesn't have to flush disk caches except as part of a transaction commit.
> 
> While the first two optimizations can't easily be measured the latter
> actually make a difference when doing lots of fsync that do not actually
> have to commit the inode, e.g. becase an ealier fsync already pushed
> the log far enough.
> 
> The new xfs_dir_fsync is identifical to xfs_nfs_commit_metadata except
> for the prototype, but I'm not sure creating a common helper for the
> two is worth it given how simple the functions are.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks good.

Reviewed-by: Alex Elder <aelder@xxxxxxx>


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