From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 25 Apr 2006 11:58:25 +0100 (BST) From: Hugh Dickins Subject: Re: [PATCH 2.6.17-rc1-mm3] add migratepage addresss space op to shmem In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Christoph Lameter Cc: Lee Schermerhorn , Andrew Morton , linux-mm@kvack.org List-ID: On Mon, 24 Apr 2006, Christoph Lameter wrote: > On Mon, 24 Apr 2006, Hugh Dickins wrote: > > > > While that's not wrong, wouldn't the right fix be something else? > > His patch avoids going through the fallback functions and allows > migrating dirty shmem pages without pageout. That is good. True. > Index: linux-2.6/mm/migrate.c > =================================================================== > --- linux-2.6.orig/mm/migrate.c 2006-04-18 12:51:31.000000000 -0700 > +++ linux-2.6/mm/migrate.c 2006-04-24 15:03:10.000000000 -0700 > @@ -439,6 +439,11 @@ redo: > goto unlock_both; > } > > + if (try_to_unmap(page, 1) == SWAP_FAIL) { > + rc = -EPERM; > + goto unlock_both; > + } > + > /* > * Default handling if a filesystem does not provide > * a migration function. We can only migrate clean Perhaps. But there seem to be altogether too many ways through this code: this part of migrate_pages then starts to look rather like, but not exactly like, swap_page. Feels like it needs refactoring. Hugh -- 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