[PATCH 12/14] readahead: account I/O block times for stock readahead

From: Fengguang Wu
Date: Fri Mar 16 2007 - 04:53:26 EST


Account I/O block times for the stock readahead, too.

Signed-off-by: Fengguang Wu <wfg@xxxxxxxxxxxxxxxx>

---
mm/readahead.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

--- linux-2.6.21-rc3-mm2.orig/mm/readahead.c
+++ linux-2.6.21-rc3-mm2/mm/readahead.c
@@ -1756,15 +1756,15 @@ EXPORT_SYMBOL_GPL(page_cache_readahead_a
*/
void readahead_cache_hit(struct file_ra_state *ra, struct page *page)
{
- if (!prefer_adaptive_readahead())
- return;
-
if (PageActive(page) || PageReferenced(page))
return;

if (!PageUptodate(page))
ra_account(ra, RA_EVENT_IO_BLOCK, 1);

+ if (!prefer_adaptive_readahead())
+ return;
+
if (!ra_has_index(ra, page->index))
return;


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