From: Wu Fengguang <wfg@mail.ustc.edu.cn>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, Wu Fengguang <wfg@mail.ustc.edu.cn>
Subject: [PATCH 1/5] readahead: no RA_FLAG_EOF on single page file
Date: Fri, 09 Jun 2006 16:08:02 +0800 [thread overview]
Message-ID: <349840678.85381@ustc.edu.cn> (raw)
Message-ID: <20060609081119.231751179@localhost.localdomain> (raw)
In-Reply-To: 20060609080801.741901069@localhost.localdomain
[-- Attachment #1: readahead-reduce-close-call.patch --]
[-- Type: text/plain, Size: 802 bytes --]
Dot not set RA_FLAG_EOF on single page files.
readahead_close() will be called if RA_FLAG_EOF is there on file close.
It detects readahead hit/miss, and adjust ra_expected_bytes correspondingly.
Single page files are uninteresting for it. Since near 40% desktop
files are <= 4k, this patch can reduce many useless readahead_close()
invocations.
Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn>
---
--- linux-2.6.17-rc5-mm3.orig/mm/readahead.c
+++ linux-2.6.17-rc5-mm3/mm/readahead.c
@@ -1037,7 +1037,8 @@ static int ra_dispatch(struct file_ra_st
ra->readahead_index = eof_index;
if (ra->lookahead_index > eof_index)
ra->lookahead_index = eof_index;
- ra->flags |= RA_FLAG_EOF;
+ if (eof_index > 1)
+ ra->flags |= RA_FLAG_EOF;
}
/* Disable look-ahead for loopback file. */
--
next prev parent reply other threads:[~2006-06-09 8:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-09 8:08 [PATCH 0/5] Adaptive readahead updates 2 Wu Fengguang
2006-06-09 8:08 ` Wu Fengguang
2006-06-09 8:08 ` Wu Fengguang [this message]
2006-06-09 8:08 ` [PATCH 1/5] readahead: no RA_FLAG_EOF on single page file Wu Fengguang
2006-06-09 8:08 ` [PATCH 3/5] readahead: call scheme - no fastcall for readahead_cache_hit() Wu Fengguang
2006-06-09 8:08 ` Wu Fengguang
2006-06-09 8:08 ` [PATCH 4/5] readahead: backoff on I/O error Wu Fengguang
2006-06-09 8:08 ` Wu Fengguang
2006-06-10 18:33 ` Ingo Oeser
2006-06-10 19:48 ` Michael Tokarev
2006-06-12 1:12 ` Wu Fengguang
2006-06-12 1:12 ` Wu Fengguang
2006-06-12 3:43 ` Andrew Morton
2006-06-12 11:06 ` Michael Tokarev
2006-06-17 6:38 ` Michael Tokarev
2006-06-17 7:00 ` Michael Tokarev
2006-06-09 8:08 ` [PATCH 5/5] readahead: remove size limit on read_ahead_kb Wu Fengguang
2006-06-09 8:08 ` Wu Fengguang
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=349840678.85381@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.