diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-04-11 23:15:07 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-04-11 23:15:07 -0700 |
| commit | 9672a337305358ecc81dc17700e58ce3f42c11f6 (patch) | |
| tree | 94c5e475a5e6ef1ce1f443fe596154c12e63a736 /include/linux | |
| parent | bd134f2720aa6fe1544a76360999d8e18e5f3e02 (diff) | |
[PATCH] writeback efficiency and QoS improvements
The radix-tree walk for writeback has a couple of problems:
a) It always scans a file from its first dirty page, so if someone
is repeatedly dirtying the front part of a file, pages near the end
may be starved of writeout. (Well, not completely: the `kupdate'
function will write an entire file once the file's dirty timestamp
has expired).
b) When the disk queues are huge (10000 requests), there can be a
very large number of locked pages. Scanning past these in writeback
consumes quite some CPU time.
So in each address_space we record the index at which the last batch of
writeout terminated and start the next batch of writeback from that
point.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index dc8c46fb4b69..bacf6bcbc7b7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -324,6 +324,7 @@ struct address_space { struct radix_tree_root page_tree; /* radix tree of all pages */ spinlock_t tree_lock; /* and spinlock protecting it */ unsigned long nrpages; /* number of total pages */ + pgoff_t writeback_index;/* writeback starts here */ struct address_space_operations *a_ops; /* methods */ struct list_head i_mmap; /* list of private mappings */ struct list_head i_mmap_shared; /* list of shared mappings */ |
