linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Rientjes <rientjes@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>,
	Fengguang Wu <fengguang.wu@intel.com>,
	David Cohen <david.a.cohen@linux.intel.com>,
	Al Viro <viro@zeniv.linux.org.uk>,
	Damien Ramonda <damien.ramonda@intel.com>,
	Jan Kara <jack@suse.cz>, Linus <torvalds@linux-foundation.org>,
	nacc@linux.vnet.ibm.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH V6 ] mm readahead: Fix readahead fail for memoryless cpu and limit readahead pages
Date: Tue, 18 Feb 2014 14:46:01 -0800 (PST)	[thread overview]
Message-ID: <alpine.DEB.2.02.1402181441360.20772@chino.kir.corp.google.com> (raw)
In-Reply-To: <20140218143838.aee7a4f0c94ab28b3b04c1e4@linux-foundation.org>

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 :)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

      reply	other threads:[~2014-02-18 22:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18  7:25 Raghavendra K T
2014-02-18  9:49 ` Jan Kara
2014-02-18 12:04   ` Raghavendra K T
2014-02-18 12:04     ` Jan Kara
2014-03-17  2:07     ` Madper Xie
2014-03-18  7:13       ` Raghavendra K T
2014-02-18 22:23 ` David Rientjes
2014-02-18 22:38   ` Andrew Morton
2014-02-18 22:46     ` David Rientjes [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=alpine.DEB.2.02.1402181441360.20772@chino.kir.corp.google.com \
    --to=rientjes@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=damien.ramonda@intel.com \
    --cc=david.a.cohen@linux.intel.com \
    --cc=fengguang.wu@intel.com \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nacc@linux.vnet.ibm.com \
    --cc=raghavendra.kt@linux.vnet.ibm.com \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /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