Make compute_thrashing_threshold() a pure computing routine,
by moving the readahead_ratio policy out of it.
Signed-off-by: Fengguang Wu <[email protected]>
---
mm/readahead.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- linux-2.6.20-rc4-mm1.orig/mm/readahead.c
+++ linux-2.6.20-rc4-mm1/mm/readahead.c
@@ -1025,7 +1025,7 @@ static unsigned long compute_thrashing_t
stream_shift = ra_invoke_interval(ra);
/* future safe space */
- ll = (uint64_t) stream_shift * (global_size >> 9) * readahead_ratio * 5;
+ ll = (uint64_t) stream_shift * global_size;
do_div(ll, global_shift);
ra_size = ll;
@@ -1063,6 +1063,7 @@ state_based_readahead(struct address_spa
la_old = la_size = ra->readahead_index - offset;
ra_old = ra_readahead_size(ra);
ra_size = compute_thrashing_threshold(ra, &remain_space);
+ ra_size = ra_size * readahead_ratio / 100;
if (page && remain_space <= la_size) {
rescue_pages(page, la_size);
--
-
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]