linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Stephen Lord <lord@sgi.com>
Cc: Rik van Riel <riel@conectiva.com.br>,
	Christoph Hellwig <hch@lst.de>,
	torvalds@transmeta.com, linux-mm@kvack.org
Subject: Re: [RFC] start_aggressive_readahead
Date: Fri, 26 Jul 2002 13:29:31 -0700	[thread overview]
Message-ID: <3D41B12B.77DD941E@zip.com.au> (raw)
In-Reply-To: <1027714455.1727.9.camel@localhost.localdomain>

Stephen Lord wrote:
> 
> On Thu, 2002-07-25 at 14:40, Andrew Morton wrote:
> > Rik van Riel wrote:
> > >
> > > On Thu, 25 Jul 2002, Christoph Hellwig wrote:
> > >
> > > > This function (start_aggressive_readahead()) checks whether all zones
> > > > of the given gfp mask have lots of free pages.
> > >
> > > Seems a bit silly since ideally we wouldn't reclaim cache memory
> > > until we're low on physical memory.
> > >
> >
> > Yes, I would question its worth also.
> >
> >
> > What it boils down to is:  which pages are we, in the immediate future,
> > more likely to use?  Pages which are at the tail of the inactive list,
> > or pages which are in the file's readahead window?
> >
> > I'd say the latter, so readahead should just go and do reclaim.
> >
> 
> The interesting thing is that tuning metadata readahead using
> this function does indeed improve performance under heavy memory
> load. It seems we end up pushing more useful things out of
> memory than the metadata we read in.

I'm surprised.  Could be that even when there is no memory
pressure, you're simply reading stuff which you're never using?

Ah.  Could be that the improvements which you saw are nothing
to do with leaving memory free, and everything to do with the
extreme latency which occurs in page reclaim when the system
is under load.  (I'm whining again).

> Andrew, you talked about
> a GFP flag which would mean only return memory if there was
> some available which was already free and clean.

Yes, you can do that now.  Just use

	GFP_ATOMIC & ~__GFP_HIGH

and the allocation will fail if it could not be satisfied
from a zone which has (free_pages > zone->pages_min).

Which will dip further into the page reserves than the
start_aggressive_readahead() approach would have, but it'll
certainly get around the page reclaim latency.

(You'll need to set PF_NOWARN around the call, else the
page allocator will spam you to death.  Sorry)

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

  reply	other threads:[~2002-07-26 20:29 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-25 16:10 Christoph Hellwig
2002-07-25 16:44 ` Rik van Riel
2002-07-25 19:40   ` Andrew Morton
2002-07-26 16:50     ` Scott Kaplan
2002-07-26 19:38       ` Andrew Morton
2002-07-28 23:32         ` Scott Kaplan
2002-07-29  0:19           ` Rik van Riel
2002-07-29  2:12             ` Scott Kaplan
2002-07-29  3:05               ` Rik van Riel
2002-07-29 15:24                 ` Scott Kaplan
2002-07-29  7:34           ` Andrew Morton
2002-07-29  7:37             ` Vladimir Dergachev
2002-07-29  7:53               ` Andrew Morton
2002-07-29  8:04             ` Rik van Riel
2002-07-30 16:11             ` Scott Kaplan
2002-07-30 16:21               ` Martin J. Bligh
2002-07-30 16:38                 ` Scott Kaplan
2002-07-30 16:52                   ` Martin J. Bligh
2002-08-05 18:54                     ` Scott Kaplan
2002-07-30 17:13                 ` William Lee Irwin III
2002-07-26 20:14     ` Stephen Lord
2002-07-26 20:29       ` Andrew Morton [this message]
2002-07-26  6:53 ` Daniel Phillips

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=3D41B12B.77DD941E@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=hch@lst.de \
    --cc=linux-mm@kvack.org \
    --cc=lord@sgi.com \
    --cc=riel@conectiva.com.br \
    --cc=torvalds@transmeta.com \
    /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