From: Nick Piggin <npiggin@suse.de>
To: Christoph Lameter <clameter@sgi.com>
Cc: Christoph Lameter <clameter@engr.sgi.com>,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Christoph Hellwig <hch@infradead.org>
Subject: Re: [rfc][patch 2/2] mm: mlocked pages off LRU
Date: Tue, 6 Mar 2007 02:44:03 +0100 [thread overview]
Message-ID: <20070306014403.GD23845@wotan.suse.de> (raw)
In-Reply-To: <Pine.LNX.4.64.0703051723240.16842@schroedinger.engr.sgi.com>
On Mon, Mar 05, 2007 at 05:27:37PM -0800, Christoph Lameter wrote:
> On Tue, 6 Mar 2007, Nick Piggin wrote:
>
> > > Which breaks page migration for mlocked pages.
> >
> > Yeah, the simple way to fix migration is to just clear_page_mlock those
> > pages so they'll lazily be mlocked again. However we could probably do
> > something fancier like transferring the PG_mlock bit and the mlock_count.
>
> That will also drop the page count.
?? You _want_ to drop the page count so that migration will work.
> > > I think there is still some thinking going on about also removing
> > > anonymous pages off the LRU if we are out of swap or have no swap. In
> > > that case we may need page->lru to track these pages so that they can be
> > > fed back to the LRU when swap is added later.
> >
> > That's OK: they won't get mlocked if they are not on the LRU (and won't
> > get taken off the LRU if they are mlocked).
>
> But we may want to keep them off the LRU.
They will be. Either by mlock or by the !swap condition.
> > > I was a bit hesitant to use an additional ref counter because we are here
> > > overloading a refcounter on a LRU field? I have a bad feeling here. There
> >
> > If we ensure !PageLRU then we can use the lru field. I don't see
> > a problem.
>
> Wrong. !PageLRU means that the page may be on some other list. Like the
> vmscan pagelist and the page migration list. You can only be sure that it
> is not on those lists if a function took the page off the LRU. If you then
> mark it PageMlocked then you may be sure that the LRU field is free for
> use.
Bad wording: by "if we ensure !PageLRU" I meant "if we take the page off
the LRU ourselves". Why do you have a bad feeling about this? As you
say, vmscan and page migration do exactly the same thing and it is a
fundamental way that the lru mechanism works.
> > > Ok you basically keep the first patch of my set. Maybe include that
> > > explicitly ?
> >
> > It is a bit different. I don't want to break out as soon as it hits
> > an mlocked vma, in order to be able to count up all mlocked vmas and
> > set the correct mlock_count.
>
> ?? The first patch just adds a new exist code to try_to_unmap.
Well I will probably break my patch out into several bits if/when it
is ready to merge. Not such a big deal at present though.
--
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>
next prev parent reply other threads:[~2007-03-06 1:44 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-05 16:17 Nick Piggin
2007-03-05 16:40 ` Nick Piggin
2007-03-05 17:12 ` Christoph Hellwig
2007-03-05 18:17 ` Christoph Lameter
2007-03-05 18:14 ` Christoph Lameter
2007-03-05 19:26 ` Rik van Riel
2007-03-06 1:05 ` Nick Piggin
2007-03-06 1:27 ` Christoph Lameter
2007-03-06 1:44 ` Nick Piggin [this message]
2007-03-06 1:55 ` Christoph Lameter
2007-03-06 2:13 ` Nick Piggin
2007-03-06 2:46 ` Christoph Lameter
2007-03-06 2:50 ` Nick Piggin
2007-03-06 14:30 ` Nick Piggin
2007-03-06 18:30 ` Christoph Lameter
2007-03-07 3:07 ` Nick Piggin
2007-03-06 22:23 ` Lee Schermerhorn
2007-03-07 3:52 ` Nick Piggin
2007-03-06 15:59 ` Rik van Riel
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=20070306014403.GD23845@wotan.suse.de \
--to=npiggin@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@engr.sgi.com \
--cc=clameter@sgi.com \
--cc=hch@infradead.org \
--cc=linux-mm@kvack.org \
/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