public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Pratt <slpratt@austin.ibm.com>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Andrew Morton <akpm@osdl.org>,
	Bryan Fink <bfink@eventmonitor.com>,
	linux-kernel@vger.kernel.org, Ram Pai <linuxram@us.ibm.com>,
	Trond Myklebust <trond.myklebust@fys.uio.no>
Subject: Re: [PATCH] readahead: fix initial window size calculation
Date: Mon, 27 Feb 2006 09:41:59 -0600	[thread overview]
Message-ID: <44031DC7.20602@austin.ibm.com> (raw)
In-Reply-To: <44020681.8F74CD53@tv-sign.ru>

Oleg Nesterov wrote:

>(I hope it is ok to send this patch without Steven's reply)
>  
>

Yes, It is fine.

>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;
>  
>


      reply	other threads:[~2006-02-27 15:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-26 19:50 [PATCH] readahead: fix initial window size calculation Oleg Nesterov
2006-02-27 15:41 ` Steven Pratt [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=44031DC7.20602@austin.ibm.com \
    --to=slpratt@austin.ibm.com \
    --cc=akpm@osdl.org \
    --cc=bfink@eventmonitor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=oleg@tv-sign.ru \
    --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