linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: akpm@osdl.org, linux-mm@kvack.org
Subject: Re: Page Migration: Make do_swap_page redo the fault
Date: Sat, 8 Apr 2006 11:25:41 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0604081058290.16914@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0604081312200.14441@blonde.wat.veritas.com>

On Sat, 8 Apr 2006, Hugh Dickins wrote:

> > do_swap_page may interpret an invalid swap entry without this patch 
> > because we do not reload the pte if we are looping back. The page 
> > migration code may already have reused the swap entry referenced by our
> > local swp_entry.
> 
> Wouldn't you better just remove that !PageSwapCache "Page migration has
> occured" block?  Isn't that case already dealt with by the old !pte_same
> check below it?

Right. Since we now replace the swap ptes with ptes pointing to pages 
before unlocking the page this is no longer necessary (if the ptes 
contents are checked later). That of course means that remove_from_swap() 
must always succeed.

Hmmm..,. There are still two other checks for !PageSwapCache after 
obtaining a page lock in shmem_getpage() and in try_to_unuse(). 
However, both are getting to the page via the swap maps. So we need to 
keep those.

Signed-off-by: Christoph Lameter <clameter@sgi.com>

Index: linux-2.6/mm/memory.c
===================================================================
--- linux-2.6.orig/mm/memory.c	2006-04-02 21:55:26.000000000 -0700
+++ linux-2.6/mm/memory.c	2006-04-08 11:08:33.000000000 -0700
@@ -1903,12 +1903,6 @@ again:
 
 	mark_page_accessed(page);
 	lock_page(page);
-	if (!PageSwapCache(page)) {
-		/* Page migration has occured */
-		unlock_page(page);
-		page_cache_release(page);
-		goto again;
-	}
 
 	/*
 	 * Back out if somebody else already faulted in this pte.

--
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>

  reply	other threads:[~2006-04-08 18:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-04  5:33 Christoph Lameter
2006-04-08 12:16 ` Hugh Dickins
2006-04-08 18:25   ` Christoph Lameter [this message]
2006-04-08 19:26     ` Hugh Dickins
2006-04-08 21:39       ` Christoph Lameter
2006-04-09  3:11         ` Hugh Dickins
2006-04-10 18:54           ` Hugh Dickins
2006-04-10 20:19             ` Christoph Lameter
2006-04-11 14:58               ` Lee Schermerhorn
2006-04-11 15:55                 ` 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.0604081058290.16914@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --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