From: Fengguang Wu <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 14/14] readahead: remove noaction/shrink events
Date: Fri, 16 Mar 2007 16:49:10 +0800 [thread overview]
Message-ID: <374035060.24367@ustc.edu.cn> (raw)
Message-ID: <20070316085053.642868000@mail.ustc.edu.cn> (raw)
In-Reply-To: 20070316084856.687942000@mail.ustc.edu.cn
[-- Attachment #1: readahead-remove-noaction-shrink-events.patch --]
[-- Type: text/plain, Size: 2851 bytes --]
Tear down the following ra_account(NULL, ...) calls:
ra_account(RA_EVENT_LOOKAHEAD_NOACTION)
ra_account(RA_EVENT_READAHEAD_SHRINK)
The two events are not as useful and do not have clear meanings.
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
---
mm/readahead.c | 20 +++-----------------
1 file changed, 3 insertions(+), 17 deletions(-)
--- linux-2.6.21-rc3-mm2.orig/mm/readahead.c
+++ linux-2.6.21-rc3-mm2/mm/readahead.c
@@ -87,10 +87,8 @@ enum ra_event {
RA_EVENT_READAHEAD_HIT, /* read-ahead page hit */
RA_EVENT_LOOKAHEAD, /* look-ahead issued */
RA_EVENT_LOOKAHEAD_HIT, /* look-ahead mark hit */
- RA_EVENT_LOOKAHEAD_NOACTION, /* look-ahead mark ignored */
RA_EVENT_READAHEAD_MMAP, /* read-ahead for mmap access */
RA_EVENT_READAHEAD_EOF, /* read-ahead reaches EOF */
- RA_EVENT_READAHEAD_SHRINK, /* ra_size falls under previous la_size */
RA_EVENT_READAHEAD_THRASHING, /* read-ahead thrashing happened */
RA_EVENT_READAHEAD_MUTILATE, /* read-ahead mutilated by imbalanced aging */
RA_EVENT_READAHEAD_RESCUE, /* read-ahead rescued */
@@ -452,8 +450,6 @@ int force_page_cache_readahead(struct ad
nr_to_read -= this_chunk;
}
- ra_account(NULL, RA_EVENT_READAHEAD, ret);
-
return ret;
}
@@ -496,8 +492,6 @@ int do_page_cache_readahead(struct addre
ret = __do_page_cache_readahead(mapping, filp, offset, nr_to_read, 0);
- ra_account(NULL, RA_EVENT_READAHEAD, ret);
-
return ret;
}
@@ -520,7 +514,6 @@ blockable_page_cache_readahead(struct ad
actual = __do_page_cache_readahead(mapping, filp, offset, nr_to_read, 0);
- ra_account(NULL, RA_EVENT_READAHEAD, actual);
dprintk("blockable-readahead(ino=%lu, ra=%lu+%lu) = %d\n",
mapping->host->i_ino, offset, nr_to_read, actual);
@@ -1007,7 +1000,6 @@ static int adjust_rala(unsigned long *ra
* if there is a major upsurge of load, or fall of this stream's speed.
*/
if (*ra_size <= *la_size * 2) {
- ra_account(NULL, RA_EVENT_READAHEAD_SHRINK, *ra_size);
return 0;
}
@@ -1710,8 +1702,6 @@ page_cache_readahead_adaptive(struct add
/* No action on look-ahead time? */
if (page) {
- ra_account(ra, RA_EVENT_LOOKAHEAD_NOACTION,
- ra->readahead_index - offset);
return 0;
}
@@ -1807,10 +1797,8 @@ static const char * const ra_event_name[
"readahead_hit",
"lookahead",
"lookahead_hit",
- "lookahead_ignore",
"readahead_mmap",
"readahead_eof",
- "readahead_shrink",
"readahead_thrash",
"readahead_mutilt",
"readahead_rescue"
@@ -1825,13 +1813,11 @@ static void ra_account(struct file_ra_st
if (!readahead_debug_level)
return;
- if (e == RA_EVENT_READAHEAD_HIT && pages < 0) {
- c = ra_class_old(ra);
+ if (pages < 0) {
pages = -pages;
- } else if (ra)
+ c = ra_class_old(ra);
+ } else
c = ra_class_new(ra);
- else
- c = RA_CLASS_NONE;
if (!c)
c = RA_CLASS_NONE;
--
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 ` [PATCH 11/14] readahead: rename state_based_readahead() to clock_based_readahead() Fengguang Wu
[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 ` Fengguang Wu [this message]
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.24367@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