lkml.org 
[lkml]   [2006]   [Nov]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 1/2] readahead sysctl parameters fix
- do no extra readahead when (readahead_ratio == 1)
- define readahead_hit_rate inside CONFIG_ADAPTIVE_READAHEAD ifdefs

Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---

--- linux-2.6.19-rc6-mm1.orig/include/linux/mm.h
+++ linux-2.6.19-rc6-mm1/include/linux/mm.h
@@ -1074,7 +1074,7 @@ extern int readahead_ratio;

static inline int prefer_adaptive_readahead(void)
{
- return readahead_ratio > 1;
+ return readahead_ratio != 1;
}

/* Do stack extension */
--- linux-2.6.19-rc6-mm1.orig/Documentation/sysctl/vm.txt
+++ linux-2.6.19-rc6-mm1/Documentation/sysctl/vm.txt
@@ -234,7 +234,7 @@ plenty of memory(>>2MB per reader), a bi
readahead_ratio also selects the readahead logic:
VALUE CODE PATH
-------------------------------------------
- 0 disable readahead totally
+ 0 read as is, no extra readahead
1 select the stock readahead logic
2-100 select the adaptive readahead logic

--- linux-2.6.19-rc6-mm1.orig/mm/readahead.c
+++ linux-2.6.19-rc6-mm1/mm/readahead.c
@@ -40,10 +40,10 @@
/* Set read-ahead size to ##% of the thrashing-threshold. */
int readahead_ratio = 50;
EXPORT_SYMBOL_GPL(readahead_ratio);
-#endif

/* Readahead as long as cache hit ratio keeps above 1/##. */
int readahead_hit_rate = 0;
+#endif /* CONFIG_ADAPTIVE_READAHEAD */

/*
* Detailed classification of read-ahead behaviors.
--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-11-29 12:33    [W:0.024 / U:24.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site