From: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
To: Christoph Lameter <clameter@sgi.com>
Cc: linux-mm@kvack.org, lhms-devel@lists.sourceforge.net,
Hirokazu Takahashi <taka@valinux.co.jp>,
Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [Lhms-devel] [RFC 0/6] Swapless Page Migration V1: Overview
Date: Wed, 05 Apr 2006 14:52:19 -0400 [thread overview]
Message-ID: <1144263139.5203.59.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.64.0604051032130.1768@schroedinger.engr.sgi.com>
On Wed, 2006-04-05 at 10:43 -0700, Christoph Lameter wrote:
> On Wed, 5 Apr 2006, Lee Schermerhorn wrote:
>
> > > We never allow a faulting in of the new page before migration is
> > > complete. The replacing of the swap ptes with real ptes was always done
> > > after migration was complete. Same thing here.
> >
> > Unless we're talking about different things [happens], my migrate-on-
> > fault patches do this. Pages are unmapped from ptes and left hanging in
> > the cache until some task touches them. Then the migration occurs, if
>
> Well you can only umap file backed pages. These are still working the same
> way. Anonymous pages can only be remapped in a different way not unmapped.
> "unmap" of anonymous pages in todays kernels really means remap to swap
> space.
My point exactly. And to get them to migrate on fault [which I want to
do], I need to unmap them and leave them that way until some task
touches them.
>
>
> If you put the anonymous pages on swap then you can still have the old
> behavior but then you would require swap space.
Or a migration cache that behaves like swap, but doesn't actually
reserve disk space.
Note: my traces show that the current [2.6.17-rc1] migration mechanism
only uses one swap entry at a time, per running instance of migration.
So, I don't think there is a hurry to eliminate this usage for "direct
migration". If we accept migrate on fault, then pages can lay around in
the swap cache for some time. That would motivate us to investigate a
solution that doesn't reserve swap.
> > In any case, I don't think we want to be walking reverse maps and other
> > task's pte's in one task's page fault path. Perhaps "migrate-on-fault"
> > and "auto-migration" are not going to go anywhere, but if they do, we'll
> > need something like the existing swap/migration cache behavior, where
> > the temporary ptes reference a single [reference counted] cache entry
> > that points at either the old or new page.
>
> No we certainly do not want to walk reverse maps in critical sections of
> the code.
>
> I think the opportunistic lazy migration that we were talking about before
> would be fine with this scheme. You just check the refcount during the
> fault and then migrate the page if this would establish the first
> mapcount.
The pages must exist in a cache with mapcount==0 at fault time [swap or
migration cache for anon pages] for this to work, right?
>
> Pushing pages into the migration cache from the scheduler in order to
> migrate them later when references are to be reestablished will no longer
> work.
:-(, I know...
>
> Would not swap be a more appropriate mechanism there? I mean the
> functionality that you want is almost exactly the same as swap. The
> checking of the mapcounts can then work the same way as opportunistic lazy
> migration.
Yes. We've discussed this before. Swap works just fine for this. My
current migrate-on-fault and auto-migration series does not change this.
The issue that we still need to work out [assuming these patches go
forward] is whether it's perferable to let such pages hang around in the
swap cache tying up swap device space that they never intend to use, or
to implement a pseudo-swap device like the migration cache to hold the
pte entries of unmapped anon pages. I put the migration cache work on
hold to work up the aforementioned patch series. I could do this,
because it works with swap. If you remove the use of swap in
try_to_unmap(), etc., my patches would either have to put it back or
ressurect the migration cache sooner than planned. As it stands,
migrate-on-fault is a relatively small change to the in-kernel migration
mechanism.
Lee
--
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:[~2006-04-05 18:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-04 6:57 Christoph Lameter
2006-04-04 6:57 ` [RFC 1/6] Swapless V1: try_to_unmap() - Rename ignrefs to "migration" Christoph Lameter
2006-04-04 6:57 ` [RFC 2/6] Swapless V1: Add SWP_TYPE_MIGRATION Christoph Lameter
2006-04-04 11:04 ` KAMEZAWA Hiroyuki
2006-04-04 6:57 ` [RFC 3/6] Swapless V1: try_to_unmap() - Create migration entries Christoph Lameter
2006-04-04 6:58 ` [RFC 4/6] Swapless V1: remove migration ptes Christoph Lameter
2006-04-04 6:58 ` [RFC 5/6] Swapless V1: Rip out swap migration code Christoph Lameter
2006-04-04 10:37 ` KAMEZAWA Hiroyuki
2006-04-04 15:06 ` Christoph Lameter
2006-04-05 1:06 ` KAMEZAWA Hiroyuki
2006-04-05 2:45 ` Christoph Lameter
2006-04-05 3:33 ` KAMEZAWA Hiroyuki
2006-04-05 3:47 ` Christoph Lameter
2006-04-05 4:07 ` KAMEZAWA Hiroyuki
2006-04-04 6:58 ` [RFC 6/6] Swapless V1: Revise main migration logic Christoph Lameter
2006-04-04 10:58 ` KAMEZAWA Hiroyuki
2006-04-04 14:24 ` Christoph Lameter
2006-04-05 14:46 ` [Lhms-devel] [RFC 0/6] Swapless Page Migration V1: Overview Lee Schermerhorn
2006-04-05 16:28 ` Christoph Lameter
2006-04-05 16:58 ` Lee Schermerhorn
2006-04-05 17:43 ` Christoph Lameter
2006-04-05 18:52 ` Lee Schermerhorn [this message]
2006-04-05 18:17 ` Some ideas on lazy migration with swapless migration Christoph Lameter
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=1144263139.5203.59.camel@localhost.localdomain \
--to=lee.schermerhorn@hp.com \
--cc=clameter@sgi.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.com \
--cc=taka@valinux.co.jp \
/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