Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754096Ab0DVX4J (ORCPT ); Thu, 22 Apr 2010 19:56:09 -0400 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:53460 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090Ab0DVX4H (ORCPT ); Thu, 22 Apr 2010 19:56:07 -0400 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 Date: Fri, 23 Apr 2010 08:52:03 +0900 From: KAMEZAWA Hiroyuki To: Christoph Lameter Cc: Mel Gorman , Minchan Kim , Andrew Morton , Andrea Arcangeli , Adam Litke , Avi Kivity , David Rientjes , KOSAKI Motohiro , Rik van Riel , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 04/14] mm,migration: Allow the migration of PageSwapCache pages Message-Id: <20100423085203.b43d1cb3.kamezawa.hiroyu@jp.fujitsu.com> In-Reply-To: References: <20100421153421.GM30306@csn.ul.ie> <20100422092819.GR30306@csn.ul.ie> <20100422184621.0aaaeb5f.kamezawa.hiroyu@jp.fujitsu.com> <20100422193106.9ffad4ec.kamezawa.hiroyu@jp.fujitsu.com> <20100422195153.d91c1c9e.kamezawa.hiroyu@jp.fujitsu.com> <20100422141404.GA30306@csn.ul.ie> <20100422154003.GC30306@csn.ul.ie> <20100422192923.GH30306@csn.ul.ie> Organization: FUJITSU Co. LTD. X-Mailer: Sylpheed 3.0.2 (GTK+ 2.10.14; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1065 Lines: 31 On Thu, 22 Apr 2010 14:40:46 -0500 (CDT) Christoph Lameter wrote: > On Thu, 22 Apr 2010, Mel Gorman wrote: > > > vma_adjust() is updating anon VMA information without any locks taken. > > In constract, file-backed mappings use the i_mmap_lock. This lack of > > locking can result in races with page migration. During rmap_walk(), > > vma_address() can return -EFAULT for an address that will soon be valid. > > This leaves a dangling migration PTE behind which can later cause a > > BUG_ON to trigger when the page is faulted in. > > Isnt this also a race with reclaim / swap? > Yes, it's also race in reclaim/swap ... page_referenced() try_to_unmap(). rmap_walk() <==== we hit this case. But above 2 are not considered to be critical. I'm not sure how this race affect KSM. Thanks, -Kame -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/