Re: [PATCH] readahead: fix initial window size calculation



Oleg Nesterov wrote:

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



Yes, It is fine.

From: Steven Pratt <slpratt@xxxxxxxxxxxxxx>

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;



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: TSO/E ANCAS24 USERMOD
    ... and have not yet done so, will request the ANCAS24 usermod from TSO/E level 2 as soon as possible. ... Even if you're unable to exploit the new function right away, the request sends the right message as to level of interest in this support. ... there is an excellent chance the TSO/E folks can be convinced to turn this valuable support into a new function APAR. ... The IBM 3180 introduced user specified screen sizes as part of the explicit partition support. ...
    (bit.listserv.ibm-main)
  • [PATCH] readahead: fix initial window size calculation
    ... Here is a quick summary of sizes ... computed under current design and under the attached patch. ... 32k max, 4k request ... return newsize; ...
    (Linux-Kernel)
  • Re: [00/17] Large Blocksize Support V3
    ... a request, but rather the problem that some devices don't have a large ... in a 4K page sizes. ... This all sounds like a device design issue rather than anything more ... pressure should fix the hardware. ...
    (Linux-Kernel)
  • Re: [PATCH] ieee1394: sbp2: fix for SYM13FW500 bridge (Datafab disk)
    ... sizes. ... Reported by Piergiorgio Sartor for ... This fix is necessary because sbp2's default request size limit has been ...
    (Linux-Kernel)
  • [PATCH] firewire: fw-sbp2: fix for SYM13FW500 bridge (Datafab disk)
    ... Fix I/O errors due to SYM13FW500's inability to handle larger request ... sizes. ... Reported by Piergiorgio Sartor in ... Stefan Richter ...
    (Linux-Kernel)