diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-11 14:10:30 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2009-03-11 14:10:30 -0400 |
commit | 72cb77f4a5ace37b12dcb47a0e8637a2c28ad881 (patch) | |
tree | 62fbdd7a34884f3ea9e1b0ba6bd5a4d78263f847 /include | |
parent | fb8a1f11b64e213d94dfa1cebb2a42a7b8c115c4 (diff) |
NFS: Throttle page dirtying while we're flushing to disk
The following patch is a combination of a patch by myself and Peter
Staubach.
Trond: If we allow other processes to dirty pages while a process is doing
a consistency sync to disk, we can end up never making progress.
Peter: Attached is a patch which addresses a continuing problem with
the NFS client generating out of order WRITE requests. While
this is compliant with all of the current protocol
specifications, there are servers in the market which can not
handle out of order WRITE requests very well. Also, this may
lead to sub-optimal block allocations in the underlying file
system on the server. This may cause the read throughputs to
be reduced when reading the file from the server.
Peter: There has been a lot of work recently done to address out of
order issues on a systemic level. However, the NFS client is
still susceptible to the problem. Out of order WRITE
requests can occur when pdflush is in the middle of writing
out pages while the process dirtying the pages calls
generic_file_buffered_write which calls
generic_perform_write which calls
balance_dirty_pages_rate_limited which ends up calling
writeback_inodes which ends up calling back into the NFS
client to writes out dirty pages for the same file that
pdflush happens to be working with.
Signed-off-by: Peter Staubach <staubach@redhat.com>
[modification by Trond to merge the two similar patches]
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/nfs_fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index c9fecd3e8f0f..933bc261c0df 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -206,6 +206,7 @@ struct nfs_inode { | |||
206 | #define NFS_INO_STALE (1) /* possible stale inode */ | 206 | #define NFS_INO_STALE (1) /* possible stale inode */ |
207 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ | 207 | #define NFS_INO_ACL_LRU_SET (2) /* Inode is on the LRU list */ |
208 | #define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */ | 208 | #define NFS_INO_MOUNTPOINT (3) /* inode is remote mountpoint */ |
209 | #define NFS_INO_FLUSHING (4) /* inode is flushing out data */ | ||
209 | 210 | ||
210 | static inline struct nfs_inode *NFS_I(const struct inode *inode) | 211 | static inline struct nfs_inode *NFS_I(const struct inode *inode) |
211 | { | 212 | { |