From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 28 Apr 2006 17:46:22 -0700 (PDT) From: Christoph Lameter Subject: Re: [PATCH 1/7] page migration: Reorder functions in migrate.c In-Reply-To: <20060428173650.146a6605.akpm@osdl.org> Message-ID: References: <20060428060302.30257.76871.sendpatchset@schroedinger.engr.sgi.com> <20060428150806.057b0bac.akpm@osdl.org> <20060428161830.7af8c3f0.akpm@osdl.org> <20060428173650.146a6605.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton Cc: linux-mm@kvack.org, kamezawa.hiroyu@jp.fujitsu.com, lee.schermerhorn@hp.com, hugh@veritas.com List-ID: On Fri, 28 Apr 2006, Andrew Morton wrote: > hm. migrate_pages() locks two pages at the same time. We've avoided doing > that. > > a) what prevents ab/ba deadlocks in the migration code? Nothing right now. > b) if some other part of the kernel later decides to lock two pages at > the same time, what protocol should that code follow to avoid ab/ba > deadlocks? lowest-pfn-first might be one. We could just do a TestSetPageLocked() on the newpage. If it fails then we postphone migration to the next loop. Patch on top of the one i just sent you or after the cleanup patches? -- 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