linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: David Rientjes <rientjes@google.com>
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:38:38 -0800	[thread overview]
Message-ID: <20140218143838.aee7a4f0c94ab28b3b04c1e4@linux-foundation.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1402181421590.20772@chino.kir.corp.google.com>

On Tue, 18 Feb 2014 14:23:44 -0800 (PST) David Rientjes <rientjes@google.com> wrote:

> On Tue, 18 Feb 2014, Raghavendra K T wrote:
> 
> > Currently max_sane_readahead() returns zero on the cpu having no local memory node
> > which leads to readahead failure. Fix the readahead failure by returning
> > minimum of (requested pages, 512). Users running application on a memory-less cpu
> > which needs readahead such as streaming application see considerable boost in the
> > performance.
> > 
> > Result:
> > fadvise experiment with FADV_WILLNEED on a PPC machine having memoryless CPU
> > with 1GB testfile ( 12 iterations) yielded around 46.66% improvement.
> > 
> > fadvise experiment with FADV_WILLNEED on a x240 machine with 1GB testfile
> > 32GB* 4G RAM  numa machine ( 12 iterations) showed no impact on the normal
> > NUMA cases w/ patch.
> > 
> > Kernel     Avg  Stddev
> > base	7.4975	3.92%
> > patched	7.4174  3.26%
> > 
> > Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
> > [Andrew: making return value PAGE_SIZE independent]
> > Signed-off-by: Raghavendra K T <raghavendra.kt@linux.vnet.ibm.com>
> 
> So this replaces 
> mm-readaheadc-fix-readahead-fail-for-no-local-memory-and-limit-readahead-pages.patch 
> in -mm correct?

yup.

> >  Changes in V6:
> >   - Just limit the readahead to 2MB on 4k pages system as suggested by Linus.
> >  and make it independent of PAGE_SIZE. 
> > 
> 
> 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.

--
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:38 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 [this message]
2014-02-18 22:46     ` David Rientjes

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=20140218143838.aee7a4f0c94ab28b3b04c1e4@linux-foundation.org \
    --to=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=rientjes@google.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