]> git.hungrycats.org Git - linux/commit
[PATCH] readahead fixes
authorRam Pai <linuxram@us.ibm.com>
Mon, 23 Aug 2004 06:06:34 +0000 (23:06 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 23 Aug 2004 06:06:34 +0000 (23:06 -0700)
commite4f8c4aa7ae4a48de64436997cc3c13a21a790ac
tree410f945b660c2fda4dbfb25a8ca262a11aaa2b85
parentda7d2464fb14a0e7240ed55c4cba79a9d471ba94
[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>
include/linux/fs.h
mm/readahead.c