[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20080131011227.257b9437.akpm@linux-foundation.org>
Date: Thu, 31 Jan 2008 01:12:27 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: hugh@...itas.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org,
npiggin@...e.de, riel@...hat.com, mztabzr@...inter.de,
mpm@...enic.com
Subject: Re: [PATCH] mm: MADV_WILLNEED implementation for anonymous memory
On Thu, 31 Jan 2008 09:44:00 +0100 Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
>
> On Wed, 2008-01-30 at 14:40 -0800, Andrew Morton wrote:
> > On Wed, 30 Jan 2008 18:28:59 +0100
> > Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> >
> > > Implement MADV_WILLNEED for anonymous pages by walking the page tables and
> > > starting asynchonous swap cache reads for all encountered swap pages.
> >
> > Why cannot this use (a perhaps suitably-modified) make_pages_present()?
>
> Because make_pages_present() relies on page faults to bring data in and
> will thus wait for all data to be present before returning.
>
> This solution is async; it will just issue a read for the requested
> pages and moves on.
>
I of course realise that. I also realise that swapin_readahead() is
_supposed_ to make the difference moot.
There's something you guys aren't telling us. Several things, actually.
Please don't do that.
Implementation-wise: make_pages_present() _can_ be converted to do this.
But it's a lot of patching, and the result will be a cleaner, faster and
smaller core MM. Whereas your approach is easy, but adds more code and
leaves the old stuff slow-and-dirty.
Guess which approach is preferred? ;)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists