mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christoph Lameter <clameter@sgi.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH mm] swapless page migration: fix swapops.h:97 BUG
Date: Wed, 24 May 2006 08:23:49 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0605240816080.15446@schroedinger.engr.sgi.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0605241329010.9391@blonde.wat.veritas.com>

On Wed, 24 May 2006, Hugh Dickins wrote:

> Such an orphan may be left behind if an earlier migration raced with fork:
> copy_one_pte can duplicate a migration entry from parent to child, after
> remove_anon_migration_ptes has checked the child vma, but before it has
> removed it from the parent vma.  (If the process were later to fault on
> this orphaned entry, it would hit the same BUG from migration_entry_wait.)

Right the pte lock does not help us there. sigh.

> This could be fixed by locking anon_vma in copy_one_pte, but we'd rather
> not.  There's no such problem with file pages, because vma_prio_tree_add
> adds child vma after parent vma, and the page table locking at each end
> is enough to serialize.  Follow that example with anon_vma: add new vmas
> to the tail instead of the head.

Thats is very subtle. I hope there are no other areas where the child vma 
has to be processed before the parent vma? An alternativbe would be to 
make remove_anon_migration_ptes walk the list in reverse and add a big 
comment.

Thank you.


  reply	other threads:[~2006-05-24 15:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 12:31 Hugh Dickins
2006-05-24 15:23 ` Christoph Lameter [this message]
2006-05-24 15:55   ` Hugh Dickins

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.0605240816080.15446@schroedinger.engr.sgi.com \
    --to=clameter@sgi.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®