Commit da7d2464 authored by Ram Pai's avatar Ram Pai Committed by Linus Torvalds

[PATCH] readahead: simplify recent fixes

Ok I have enclosed the results for the recent readahead fixes.  The summary
is: there is no significant improvement or decrease in performance of (DSS
workload, iozone, sysbench) The increase or decrease is in the margin of
errors.

I have enclosed a patch that partially backs off Miklos's fix.  Shane
Shrybman correctly pointed out that the real fix is to set ra->average
value to max/2 when we move from readahead-off mode to readahead-on mode.
The other part of Miklos's fix becomes irrelevent.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 1c0de4f6
......@@ -468,11 +468,7 @@ page_cache_readahead(struct address_space *mapping, struct file_ra_state *ra,
* pages shall be accessed in the next
* current window.
*/
average = ra->average;
if (ra->serial_cnt > average)
average = (ra->serial_cnt + ra->average + 1) / 2;
ra->next_size = min(average , (unsigned long)max);
ra->next_size = min(ra->average , (unsigned long)max);
}
ra->start = offset;
ra->size = ra->next_size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment