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 SMTP id 2C68F6B01F7 for ; Wed, 28 Apr 2010 11:39:46 -0400 (EDT) Date: Wed, 28 Apr 2010 17:39:12 +0200 From: Andrea Arcangeli Subject: Re: [PATCH 2/3] mm,migration: Prevent rmap_walk_[anon|ksm] seeing the wrong VMA information Message-ID: <20100428153912.GS510@random.random> References: <1272403852-10479-1-git-send-email-mel@csn.ul.ie> <1272403852-10479-3-git-send-email-mel@csn.ul.ie> <20100427231007.GA510@random.random> <20100428091555.GB15815@csn.ul.ie> <20100428153525.GR510@random.random> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100428153525.GR510@random.random> Sender: owner-linux-mm@kvack.org To: Mel Gorman Cc: Linux-MM , LKML , Minchan Kim , KAMEZAWA Hiroyuki , Christoph Lameter , Rik van Riel , Andrew Morton List-ID: Another way (not sure if it's good or bad, but it'd clearly avoid the restarting locks in rmap_walk) would be to allocate a shared lock, and still share the lock like the anon_vma was shared before. So we have shorter chains to walk, but still a larger lock, so we've to take just one and be safe. spin_lock(&vma->anon_vma->shared_anon_vma_lock->lock) something like that... -- 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