[PATCH 1/6] readahead: context based method - slow start

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The context method will lead to noticable overhead on sparse random reads.
Having the readahead window to start slowly makes it much better.

Signed-off-by: Wu Fengguang <[email protected]>
---


--- linux-2.6.17-mm2.orig/mm/readahead.c
+++ linux-2.6.17-mm2/mm/readahead.c
@@ -1548,6 +1548,11 @@ try_context_based_readahead(struct addre
 			return -1;
 	} else if (prev_page || probe_page(mapping, index - 1)) {
 		ra_index = index;
+		/*
+		 * Slow start of readahead window.
+		 * It helps avoid most readahead miss on sparse random reads.
+		 */
+		ra_min = readahead_hit_rate;
 	} else if (readahead_hit_rate > 1) {
 		ra_index = find_segtail_backward(mapping, index,
 						readahead_hit_rate + ra_min);

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux