From da7d2464fb14a0e7240ed55c4cba79a9d471ba94 Mon Sep 17 00:00:00 2001 From: Ram Pai Date: Sun, 22 Aug 2004 23:06:22 -0700 Subject: [PATCH] [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: Andrew Morton Signed-off-by: Linus Torvalds --- mm/readahead.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/readahead.c b/mm/readahead.c index 7073392b33577..ee686c546b5dd 100644 --- a/mm/readahead.c +++ b/mm/readahead.c @@ -468,11 +468,7 @@ do_io: * 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; -- 2.53.0