[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100507105712.18fc90c4.kamezawa.hiroyu@jp.fujitsu.com>
Date: Fri, 7 May 2010 10:57:12 +0900
From: KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Mel Gorman <mel@....ul.ie>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux-MM <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Minchan Kim <minchan.kim@...il.com>,
Christoph Lameter <cl@...ux.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Rik van Riel <riel@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH 2/2] mm,migration: Fix race between shift_arg_pages and
rmap_walk by guaranteeing rmap_walk finds PTEs created within the temporary
stack
On Thu, 6 May 2010 18:40:39 -0700 (PDT)
Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>
>
> On Fri, 7 May 2010, Mel Gorman wrote:
> >
> > Page migration requires rmap to be able to find all migration ptes
> > created by migration. If the second rmap_walk clearing migration PTEs
> > misses an entry, it is left dangling causing a BUG_ON to trigger during
> > fault. For example;
>
> So I still absolutely detest this patch.
>
> Why didn't the other - much simpler - patch work? The one Rik pointed to:
>
> http://lkml.org/lkml/2010/4/30/198
>
> and didn't do that _disgusting_ temporary anon_vma?
>
I vote for simple one rather than temporal anon_vma. IIUC, this patch is selected
for not to leak exec's problem out to mm/ by magical check.
> Alternatively, why don't we just take the anon_vma lock over this region,
> so that rmap can't _walk_ the damn thing?
>
IIUC, move_page_tables() may call "page table allocation" and it cannot be
done under spinlock.
Thanks,
-Kame
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists