diff options
author | David Chinner <dgc@sgi.com> | 2007-11-23 00:29:18 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-07 02:16:07 -0500 |
commit | 5d51eff4538bdfeb9b7a2ec030ee3b0980b067d2 (patch) | |
tree | 27606a34eab830ccc9a066f14f598af0c0c9027c /fs/xfs/linux-2.6/xfs_iops.c | |
parent | e4143a1cf5973e3443c0650fc4c35292d3b7baa8 (diff) |
[XFS] Fix inode allocation latency
The log force added in xfs_iget_core() has been a performance issue since
it was introduced for tight loops that allocate then unlink a single file.
under heavy writeback, this can introduce unnecessary latency due tothe
log I/o getting stuck behind bulk data writes.
Fix this latency problem by avoinding the need for the log force by moving
the place we mark linux inode dirty to the transaction commit rather than
on transaction completion.
This also closes a potential hole in the sync code where a linux inode is
not dirty between the time it is modified and the time the log buffer has
been written to disk.
SGI-PV: 972753
SGI-Modid: xfs-linux-melb:xfs-kern:30007a
Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index b5afcfcdc7d5..264b1e7dacf7 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -71,6 +71,22 @@ xfs_synchronize_atime( | |||
71 | } | 71 | } |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * If the linux inode exists, mark it dirty. | ||
75 | * Used when commiting a dirty inode into a transaction so that | ||
76 | * the inode will get written back by the linux code | ||
77 | */ | ||
78 | void | ||
79 | xfs_mark_inode_dirty_sync( | ||
80 | xfs_inode_t *ip) | ||
81 | { | ||
82 | bhv_vnode_t *vp; | ||
83 | |||
84 | vp = XFS_ITOV_NULL(ip); | ||
85 | if (vp) | ||
86 | mark_inode_dirty_sync(vn_to_inode(vp)); | ||
87 | } | ||
88 | |||
89 | /* | ||
74 | * Change the requested timestamp in the given inode. | 90 | * Change the requested timestamp in the given inode. |
75 | * We don't lock across timestamp updates, and we don't log them but | 91 | * We don't lock across timestamp updates, and we don't log them but |
76 | * we do record the fact that there is dirty information in core. | 92 | * we do record the fact that there is dirty information in core. |