lkml.org 
[lkml]   [2007]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/6] readahead: min/max sizes: remove get_readahead_bounds()
Remove get_readahead_bounds():
- ra_max: we already have get_max_readahead() for it
- ra_min: is only used by context based readahead, and will be moved there
and set to a more reasonable value

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

---
mm/readahead.c | 24 ------------------------
1 file changed, 24 deletions(-)

--- linux-2.6.20-rc3-mm1.orig/mm/readahead.c
+++ linux-2.6.20-rc3-mm1/mm/readahead.c
@@ -780,30 +780,6 @@ out:
return nr_pages;
}

-/*
- * ra_min is mainly determined by the size of cache memory. Reasonable?
- *
- * Table of concrete numbers for 4KB page size:
- * inactive + free (MB): 4 8 16 32 64 128 256 512 1024
- * ra_min (KB): 16 16 16 16 20 24 32 48 64
- */
-static inline void get_readahead_bounds(struct file_ra_state *ra,
- unsigned long *ra_min,
- unsigned long *ra_max)
-{
- unsigned long active;
- unsigned long inactive;
- unsigned long free;
-
- __get_zone_counts(&active, &inactive, &free, NODE_DATA(numa_node_id()));
-
- free += inactive;
- *ra_max = min(min(ra->ra_pages, 0xFFFFUL), free / 2);
- *ra_min = min(min(MIN_RA_PAGES + (free >> 14),
- DIV_ROUND_UP(64*1024, PAGE_CACHE_SIZE)),
- *ra_max / 8);
-}
-
#endif /* CONFIG_ADAPTIVE_READAHEAD */

/*
--
-
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: 2007-01-06 08:31    [W:0.052 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site