From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 14 Mar 2006 19:52:34 -0800 From: Andrew Morton Subject: Re: page migration: Fail with error if swap not setup Message-Id: <20060314195234.10cf35a7.akpm@osdl.org> In-Reply-To: References: <20060314192443.0d121e73.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 List-ID: Christoph Lameter wrote: > > On Tue, 14 Mar 2006, Andrew Morton wrote: > > > Christoph Lameter wrote: > > > > > > Currently the migration of anonymous pages will silently fail if no swap > > > is setup. > > > > Why? > > The allocation of the swap page will fail in migrate_pages() and then the > page is going on the permant failure list. Hmm... This is not a real > total failure of page migration since file backed pages can be migrated > without having swap and page migration will continue for those. However, > all anonymous pages will end up on the failed list. At the end of page > migration these will be returned to the LRU. Thus they stay where they > were. > > > I mean, if something tries to allocate a swap page and that fails then the > > error should be propagated back. That's race-free. > > It is propaged back in the form of a list of pages that failed to migrate. > Its just no clear at the end what the reasons for the individual failures > were. Its better just to check for swap availability before migration. But the operation can still fail if we run out of swapspace partway through - so this problem can still occur. The patch just makes it (much) less frequent. Surely it's possible to communicate -ENOSWAP correctly and reliably? -- 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