From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 4 Apr 2006 08:20:03 -0700 (PDT) From: Christoph Lameter Subject: Re: [patch 2/3] mm: speculative get_page In-Reply-To: <20060219020159.9923.94877.sendpatchset@linux.site> Message-ID: References: <20060219020140.9923.43378.sendpatchset@linux.site> <20060219020159.9923.94877.sendpatchset@linux.site> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Nick Piggin Cc: Andrew Morton , Linux Kernel , Linux Memory Management List-ID: Looks like the NoNewRefs flag is mostly == spin_is_locked(mapping->tree_lock)? Would it not be better to check the tree_lock? > --- linux-2.6.orig/mm/migrate.c > +++ linux-2.6/mm/migrate.c > > + SetPageNoNewRefs(page); > write_lock_irq(&mapping->tree_lock); A dream come true! If this is really working as it sounds then we can move the SetPageNoNewRefs up and avoid the final check under mapping->tree_lock. Then keep SetPageNoNewRefs until the page has been copied. It would basically play the same role as locking the page. -- 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