From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail203.messagelabs.com (mail203.messagelabs.com [216.82.254.243]) by kanga.kvack.org (Postfix) with ESMTP id 122DB6B02CA for ; Fri, 7 May 2010 10:21:27 -0400 (EDT) Date: Fri, 7 May 2010 07:18:39 -0700 (PDT) From: Linus Torvalds 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 In-Reply-To: <20100507131924.e75db6fc.kamezawa.hiroyu@jp.fujitsu.com> Message-ID: References: <1273188053-26029-1-git-send-email-mel@csn.ul.ie> <1273188053-26029-3-git-send-email-mel@csn.ul.ie> <20100507105712.18fc90c4.kamezawa.hiroyu@jp.fujitsu.com> <20100507131924.e75db6fc.kamezawa.hiroyu@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org To: KAMEZAWA Hiroyuki Cc: Mel Gorman , Andrew Morton , Linux-MM , LKML , Minchan Kim , Christoph Lameter , Andrea Arcangeli , Rik van Riel , Peter Zijlstra List-ID: On Fri, 7 May 2010, KAMEZAWA Hiroyuki wrote: > > Hmm, is this too slow ? This is the simplest one I have. Well, it may be as slow (or slower) than Andrea's, but at least it is _clean_ and actually removes code. So if we can't do it better, I'd certainly prefer this to the horribly hacky one. That said, I still think we could easily just split up "move_page_tables()" into two functions - one that just does the page table allocation, and one that actually moves the entries. In fact, I think that would even clean up the error case for move_vma() too - the page table entry movement itself could never fail, so you never end up with that insane "move back" case. Linus -- 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: email@kvack.org