lkml.org 
[lkml]   [2014]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V6 ] mm readahead: Fix readahead fail for memoryless cpu and limit readahead pages
On Tue, 18 Feb 2014, Andrew Morton wrote:

> > I'm not sure I understand why we want to be independent of PAGE_SIZE since
> > we're still relying on PAGE_CACHE_SIZE. Don't you mean to do
> >
> > #define MAX_READAHEAD ((512*PAGE_SIZE)/PAGE_CACHE_SIZE)
>
> MAX_READAHEAD is in units of "pages".
>
> This:
>
> +#define MAX_READAHEAD ((512*4096)/PAGE_CACHE_SIZE)
>
> means "two megabytes", and is implemented in a way to ensure that
> MAX_READAHEAD=2mb on 4k pagesize as well as on 64k pagesize. Because
> we don't want variations in PAGE_SIZE to cause alterations in readahead
> behavior.
>

Ah, ok, so 2MB is the magic value that we limit readhead to on all
architectures. 512 * 4096 is a strange way to write 2MB, but ok :)


\
 
 \ /
  Last update: 2014-02-19 00:21    [W:0.091 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site