[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20101122231558.57b6e04c.akpm@linux-foundation.org>
Date: Mon, 22 Nov 2010 23:15:58 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Minchan Kim <minchan.kim@...il.com>
Cc: linux-mm <linux-mm@...ck.org>, LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Rik van Riel <riel@...hat.com>,
KOSAKI Motohiro <kosaki.motohiro@...fujitsu.com>,
Johannes Weiner <hannes@...xchg.org>,
Nick Piggin <npiggin@...nel.dk>, Mel Gorman <mel@....ul.ie>
Subject: Re: [RFC 1/2] deactive invalidated pages
On Tue, 23 Nov 2010 15:05:39 +0900 Minchan Kim <minchan.kim@...il.com> wrote:
> On Tue, Nov 23, 2010 at 2:48 PM, Andrew Morton
> >> > move it to the head of the LRU anyway. __But given that the user has
> >>
> >> Why does it move into head of LRU?
> >> If the page which isn't mapped doesn't have PG_referenced, it would be
> >> reclaimed.
> >
> > If it's dirty or under writeback it can't be reclaimed!
>
> I see your point. And it's why I add it to head of inactive list.
But that *guarantees* that the page will get a full trip around the
inactive list. And this will guarantee that potentially useful pages
are reclaimed before the pages which we *know* the user doesn't want!
Bad!
Whereas if we queue it to the tail, it will only get that full trip if
reclaim happens to run before the page is cleaned. And we just agreed
that reclaim isn't likely to run immediately, because pages are being
freed.
So we face a choice between guaranteed eviction of potentially-useful
pages (which are very expensive to reestablish) versus a *possible*
need to move an unreclaimable page to the head of the LRU, which is
cheap.
So we need to decide if
(certain * possibly-expensive) is less than (possible * cheap).
So no, it's not obvious to me that this was the correct decision.
One way to help with this guess would be to instrument those pages
(would require adding a special page flag to identify them, I expect)
and see how many of these pages get immediately reclaimed off the LRU
versus how many get recycled. And then run a batch of "typical
workloads" under that instrumentation.
Only there aren't any "typical workloads" for fadvise(DONTNEED) :(
--
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