From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@osdl.org>
Cc: Bryan Fink <bfink@eventmonitor.com>,
linux-kernel@vger.kernel.org, Ram Pai <linuxram@us.ibm.com>,
Steven Pratt <slpratt@austin.ibm.com>,
Trond Myklebust <trond.myklebust@fys.uio.no>
Subject: [PATCH] readahead: fix initial window size calculation
Date: Sun, 26 Feb 2006 22:50:25 +0300 [thread overview]
Message-ID: <44020681.8F74CD53@tv-sign.ru> (raw)
(I hope it is ok to send this patch without Steven's reply)
From: Steven Pratt <slpratt@austin.ibm.com>
The current current get_init_ra_size is not optimal across different IO
sizes and max_readahead values. Here is a quick summary of sizes
computed under current design and under the attached patch. All of
these assume 1st IO at offset 0, or 1st detected sequential IO.
32k max, 4k request
old new
-----------------
8k 8k
16k 16k
32k 32k
128k max, 4k request
old new
-----------------
32k 16k
64k 32k
128k 64k
128k 128k
128k max, 32k request
old new
-----------------
32k 64k <-----
64k 128k
128k 128k
512k max, 4k request
old new
-----------------
4k 32k <----
16k 64k
64k 128k
128k 256k
512k 512k
--- 2.6.16-rc3/mm/readahead.c~ 2006-02-27 00:53:17.881019192 +0300
+++ 2.6.16-rc3/mm/readahead.c 2006-02-27 01:10:39.172718792 +0300
@@ -83,10 +83,10 @@ static unsigned long get_init_ra_size(un
{
unsigned long newsize = roundup_pow_of_two(size);
- if (newsize <= max / 64)
- newsize = newsize * newsize;
+ if (newsize <= max / 32)
+ newsize = newsize * 4;
else if (newsize <= max / 4)
- newsize = max / 4;
+ newsize = newsize * 2;
else
newsize = max;
return newsize;
next reply other threads:[~2006-02-26 19:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-26 19:50 Oleg Nesterov [this message]
2006-02-27 15:41 ` [PATCH] readahead: fix initial window size calculation Steven Pratt
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=44020681.8F74CD53@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@osdl.org \
--cc=bfink@eventmonitor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxram@us.ibm.com \
--cc=slpratt@austin.ibm.com \
--cc=trond.myklebust@fys.uio.no \
/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