From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 11/14] readahead: rename state_based_readahead() to clock_based_readahead()
Date: Fri, 16 Mar 2007 16:49:07 +0800 [thread overview]
Message-ID: <374035060.55839@ustc.edu.cn> (raw)
Message-ID: <20070316085053.155226000@mail.ustc.edu.cn> (raw)
In-Reply-To: 20070316084856.687942000@mail.ustc.edu.cn
[-- Attachment #1: readahead-rename-state_based_readahead-to-clock_based_readahead.patch --]
[-- Type: text/plain, Size: 2662 bytes --]
Rename state_based_readahead() to clock_based_readahead().
It better reflects the property of that readahead method.
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---
mm/readahead.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- linux-2.6.21-rc3-mm2.orig/mm/readahead.c
+++ linux-2.6.21-rc3-mm2/mm/readahead.c
@@ -66,7 +66,7 @@ int readahead_hit_rate = 1;
enum ra_class {
RA_CLASS_ALL,
RA_CLASS_INITIAL,
- RA_CLASS_STATE,
+ RA_CLASS_CLOCK,
RA_CLASS_CONTEXT,
RA_CLASS_CONTEXT_AGGRESSIVE,
RA_CLASS_BACKWARD,
@@ -101,7 +101,7 @@ enum ra_event {
#ifdef CONFIG_DEBUG_READAHEAD
static u32 readahead_debug_level = 1;
-static u32 disable_stateful_method;
+static u32 disable_clock_readahead;
static const char * const ra_class_name[];
static void ra_account(struct file_ra_state *ra, enum ra_event e, int pages);
# define debug_inc(var) do { var++; } while (0)
@@ -1115,7 +1115,7 @@ static unsigned long compute_thrashing_t
* Main function for file_ra_state based read-ahead.
*/
static unsigned long
-state_based_readahead(struct address_space *mapping, struct file *filp,
+clock_based_readahead(struct address_space *mapping, struct file *filp,
struct file_ra_state *ra,
struct page *page, pgoff_t offset,
unsigned long req_size, unsigned long ra_max)
@@ -1157,7 +1157,7 @@ state_based_readahead(struct address_spa
if (page && ra_old + ra_old / 8 >= ra_size)
update_ra_thrash_bytes(mapping->backing_dev_info, ra_size);
- ra_set_class(ra, RA_CLASS_STATE);
+ ra_set_class(ra, RA_CLASS_CLOCK);
ra_set_index(ra, offset, ra->readahead_index);
ra_set_size(ra, ra_size, la_size);
@@ -1687,8 +1687,8 @@ page_cache_readahead_adaptive(struct add
*/
if (offset == ra->prev_page + 1 &&
offset == ra->lookahead_index &&
- !debug_option(disable_stateful_method))
- return state_based_readahead(mapping, filp, ra, page,
+ !debug_option(disable_clock_readahead))
+ return clock_based_readahead(mapping, filp, ra, page,
offset, req_size, ra_max);
/*
@@ -1788,7 +1788,7 @@ void readahead_cache_hit(struct file_ra_
static const char * const ra_class_name[] = {
"total",
"initial",
- "state",
+ "clock",
"context",
"contexta",
"backward",
@@ -1970,8 +1970,8 @@ static int __init readahead_init(void)
debugfs_create_file("events", 0644, root, NULL, &ra_events_fops);
debugfs_create_u32("debug_level", 0644, root, &readahead_debug_level);
- debugfs_create_bool("disable_stateful_method", 0644, root,
- &disable_stateful_method);
+ debugfs_create_bool("disable_clock_readahead", 0644, root,
+ &disable_clock_readahead);
return 0;
}
--
next prev parent reply other threads:[~2007-03-16 8:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20070316084856.687942000@mail.ustc.edu.cn>
2007-03-16 8:48 ` [PATCH 00/14] Adaptive readahead update Fengguang Wu
[not found] ` <20070316085051.601015000@mail.ustc.edu.cn>
2007-03-16 8:48 ` [PATCH 01/14] readahead: state based method: check node id Fengguang Wu
[not found] ` <20070316085051.787637000@mail.ustc.edu.cn>
2007-03-16 8:48 ` [PATCH 02/14] readahead: state based method: decouple readahead_ratio from growth_limit Fengguang Wu
[not found] ` <20070316085051.939153000@mail.ustc.edu.cn>
2007-03-16 8:48 ` [PATCH 03/14] readahead: state based method: cancel lookahead gracefully Fengguang Wu
[not found] ` <20070316085052.111038000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 04/14] readahead: thrashing recovery method: check unbalanced aging Fengguang Wu
[not found] ` <20070316085052.284256000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 05/14] readahead: thrashing recovery method: refill holes Fengguang Wu
[not found] ` <20070316085052.388486000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 06/14] readahead: call scheme: cleanup Fengguang Wu
[not found] ` <20070316085052.550263000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 07/14] readahead: call scheme: catch thrashing on lookahead time Fengguang Wu
[not found] ` <20070316085052.688674000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 08/14] readahead: remove parameter ra_max from thrashing_recovery_readahead() Fengguang Wu
[not found] ` <20070316085052.868849000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 09/14] readahead: remove parameter ra_max from adjust_rala*() Fengguang Wu
[not found] ` <20070316085053.030235000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 10/14] readahead: state based method: protect against tiny size Fengguang Wu
[not found] ` <20070316085053.155226000@mail.ustc.edu.cn>
2007-03-16 8:49 ` Fengguang Wu [this message]
[not found] ` <20070316085053.339604000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 12/14] readahead: account I/O block times for stock readahead Fengguang Wu
[not found] ` <20070316085053.463858000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 13/14] readahead: rescue_pages() updates Fengguang Wu
[not found] ` <20070316085053.642868000@mail.ustc.edu.cn>
2007-03-16 8:49 ` [PATCH 14/14] readahead: remove noaction/shrink events Fengguang Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=374035060.55839@ustc.edu.cn \
--to=wfg@mail.ustc.edu.cn \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox