The patch titled readahead: initial method - user recommended size has been added to the -mm tree. Its filename is readahead-initial-method-user-recommended-size.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: readahead: initial method - user recommended size From: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> backing_dev_info.ra_pages0 is a user configurable parameter that controls the readahead size on start-of-file. Signed-off-by: Wu Fengguang <wfg@xxxxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- block/ll_rw_blk.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff -puN block/ll_rw_blk.c~readahead-initial-method-user-recommended-size block/ll_rw_blk.c --- devel/block/ll_rw_blk.c~readahead-initial-method-user-recommended-size 2006-05-27 23:06:36.000000000 -0700 +++ devel-akpm/block/ll_rw_blk.c 2006-05-27 23:06:36.000000000 -0700 @@ -3764,6 +3764,29 @@ queue_ra_store(struct request_queue *q, return ret; } +static ssize_t queue_initial_ra_show(struct request_queue *q, char *page) +{ + int kb = q->backing_dev_info.ra_pages0 << (PAGE_CACHE_SHIFT - 10); + + return queue_var_show(kb, (page)); +} + +static ssize_t +queue_initial_ra_store(struct request_queue *q, const char *page, size_t count) +{ + unsigned long kb, ra; + ssize_t ret = queue_var_store(&kb, page, count); + + ra = kb >> (PAGE_CACHE_SHIFT - 10); + q->backing_dev_info.ra_pages0 = ra; + + ra = kb * 1024; + if (q->backing_dev_info.ra_expect_bytes > ra) + q->backing_dev_info.ra_expect_bytes = ra; + + return ret; +} + static ssize_t queue_max_sectors_show(struct request_queue *q, char *page) { int max_sectors_kb = q->max_sectors >> 1; @@ -3821,6 +3844,12 @@ static struct queue_sysfs_entry queue_ra .store = queue_ra_store, }; +static struct queue_sysfs_entry queue_initial_ra_entry = { + .attr = {.name = "initial_ra_kb", .mode = S_IRUGO | S_IWUSR }, + .show = queue_initial_ra_show, + .store = queue_initial_ra_store, +}; + static struct queue_sysfs_entry queue_max_sectors_entry = { .attr = {.name = "max_sectors_kb", .mode = S_IRUGO | S_IWUSR }, .show = queue_max_sectors_show, @@ -3841,6 +3870,7 @@ static struct queue_sysfs_entry queue_io static struct attribute *default_attrs[] = { &queue_requests_entry.attr, &queue_ra_entry.attr, + &queue_initial_ra_entry.attr, &queue_max_hw_sectors_entry.attr, &queue_max_sectors_entry.attr, &queue_iosched_entry.attr, _ Patches currently in -mm which might be from wfg@xxxxxxxxxxxxxxxx are readahead-kconfig-options.patch radixtree-introduce-radix_tree_scan_hole.patch mm-introduce-probe_page.patch mm-introduce-pg_readahead.patch readahead-add-look-ahead-support-to-__do_page_cache_readahead.patch readahead-delay-page-release-in-do_generic_mapping_read.patch readahead-insert-cond_resched-calls.patch readahead-minmax_ra_pages.patch readahead-events-accounting.patch readahead-rescue_pages.patch readahead-sysctl-parameters.patch readahead-min-max-sizes.patch readahead-state-based-method-aging-accounting.patch readahead-state-based-method-routines.patch readahead-state-based-method.patch readahead-context-based-method.patch readahead-initial-method-guiding-sizes.patch readahead-initial-method-thrashing-guard-size.patch readahead-initial-method-expected-read-size.patch readahead-initial-method-user-recommended-size.patch readahead-initial-method.patch readahead-backward-prefetching-method.patch readahead-seeking-reads-method.patch readahead-thrashing-recovery-method.patch readahead-call-scheme.patch readahead-laptop-mode.patch readahead-loop-case.patch readahead-nfsd-case.patch readahead-turn-on-by-default.patch readahead-debug-radix-tree-new-functions.patch readahead-debug-traces-showing-accessed-file-names.patch readahead-debug-traces-showing-read-patterns.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html