From: Christoph Lameter <clameter@engr.sgi.com>
To: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: linux-mm <linux-mm@kvack.org>,
Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: Re: [RFC] 0/4 Migration Cache Overview
Date: Fri, 17 Feb 2006 09:12:32 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0602170906030.31408@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <1140195598.5219.77.camel@localhost.localdomain>
On Fri, 17 Feb 2006, Lee Schermerhorn wrote:
> > Could add a justification of this feature? What is the benefit of having a
> > migration cache instead of using swap pte (current migration is not really
> > using swap space per se)?
>
> I think Marcello covered that in his original posts, which I linked.
> I can go back and extract his arguments. My primary interest is for
> "lazy page migration" where anon pages can hang around the the cache
> until the task faults them in [possibly migrating] or exits, if ever.
> I think the desire to avoid using swap for this case is even stronger.
I am bit confused. A task faults in a page from the migration cache? Isnt
this swap behavior? I thought the migration cache was just to avoid using
swap page numbers for the intermediate pte values during migration?
You are moving the page when it is faulted in?
Including Marcelo's rationale may help understanding here. I read it a
while back but I do not remember the details. Please give us an overview.
> > Yes there is since handle_mm_fault accesses the pte without locking.
> > do_swap_page acquires the lock and will then recheck if the pte is the
> > same. If anything happened in between it should redo the page fault.
> I thought so, but hadn't thought of an efficient check for the fault
> handlers. I'm thinking that if the fault handler doesn't find the
> page in the cache and the page's private data doesn't match the pte
> [after appropriate conversion], the handler could return -EAGAIN
> causing handle_mm_fault to refetch the pte. I guess if the handler
> doesn't find the page in the cache, this is the slow path anyway,
> so maybe efficiency isn't such a concern. It will require converion
> of the pte to swp_entry or vice versa, right?
If the migration cache is only used for intermediary pte values then the
fault handler should wait until the migration of the page is complete.
do_swap_page acquired the page lock after checking the pte. Thus the
process should block until migration is complete.
It seems to me that what you are trying to accomplish here is already
provided for by the current swap based code. You just need to control the
swap in behavior in order to make lazy migration work right. But then I
guess I am missing something.
--
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-02-17 17:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-17 15:36 Lee Schermerhorn
2006-02-17 16:22 ` Christoph Lameter
2006-02-17 16:59 ` Lee Schermerhorn
2006-02-17 17:12 ` Christoph Lameter [this message]
2006-02-21 3:18 ` Nick Piggin
2006-02-21 18:40 ` Marcelo Tosatti
2006-02-21 18:04 ` Christoph Lameter
2006-02-21 18:49 ` Lee Schermerhorn
2006-02-21 19:19 ` 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=Pine.LNX.4.64.0602170906030.31408@schroedinger.engr.sgi.com \
--to=clameter@engr.sgi.com \
--cc=lee.schermerhorn@hp.com \
--cc=linux-mm@kvack.org \
--cc=marcelo.tosatti@cyclades.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