diff options
| author | Ram Pai <linuxram@us.ibm.com> | 2004-08-22 23:06:34 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-08-22 23:06:34 -0700 |
| commit | e4f8c4aa7ae4a48de64436997cc3c13a21a790ac (patch) | |
| tree | 410f945b660c2fda4dbfb25a8ca262a11aaa2b85 /include/linux | |
| parent | da7d2464fb14a0e7240ed55c4cba79a9d471ba94 (diff) | |
[PATCH] readahead fixes
Here is a consolidated readahead patch that takes care of the performance
regression seen with multiple threaded writes to the same file descriptor.
The patch does the following:
1. Instead of calculating the average count of sequential
access in the read patterns, it calculates the
average amount of hits in the current window.
2. This average is used to guide the size of the next current
window.
3. Since the field serial_cnt in the ra structure does not
make sense with the introduction of the new logic,
I have renamed that field as currnt_wnd_hit.
This patch will help the read patterns that are not neccessarily sequential
but have sufficient locality. However it may regress random workload.
Results:
1. Berkley Shands has reported great performance with this
patch.
2. iozone showed negligible effect on various read patterns.
3. DSS workload saw neglible change.
4. Sysbench saw a small improvement.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 27c03cff40e4..9ab017c1403c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -555,8 +555,8 @@ struct file_ra_state { unsigned long prev_page; /* Cache last read() position */ unsigned long ahead_start; /* Ahead window */ unsigned long ahead_size; - unsigned long serial_cnt; /* measure of sequentiality */ - unsigned long average; /* another measure of sequentiality */ + unsigned long currnt_wnd_hit; /* locality in the current window */ + unsigned long average; /* size of next current window */ unsigned long ra_pages; /* Maximum readahead window */ unsigned long mmap_hit; /* Cache hit stat for mmap accesses */ unsigned long mmap_miss; /* Cache miss stat for mmap accesses */ |
