From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 28 Apr 2006 19:27:06 -0700 From: Andrew Morton Subject: Re: [PATCH 1/7] page migration: Reorder functions in migrate.c Message-Id: <20060428192706.5bc76826.akpm@osdl.org> In-Reply-To: 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 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: linux-mm@kvack.org, kamezawa.hiroyu@jp.fujitsu.com, lee.schermerhorn@hp.com, hugh@veritas.com List-ID: Christoph Lameter wrote: > > 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. > OIC. > > > 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? > On top of page-migration-fix-fallback-behavior-for-dirty-pages.patch, please. This is an unprivileged-user triggerable deadlock, no? -- 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