From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 27 Feb 2006 07:47:01 -0800 (PST) From: Christoph Lameter Subject: Re: page_lock_anon_vma(): remove check for mapped page 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: Hugh Dickins Cc: akpm@osdl.org, linux-mm@kvack.org List-ID: On Sun, 26 Feb 2006, Hugh Dickins wrote: > > This is so that filesystems can generate their own migration functions. > > Filesystem may mantain structures with additional references to the pages > > being moved and we cannot move pages with buffers without filesystem > > cooperation. > > Hmm. I'd be happier about them if there were some example in the tree > of how they should be used from a filesystem: kill the EXPORTs until > then? probably too late now, to make that change in 2.6.16. There is an example in fs/buffer.c and xfs/ext2/ext3 use that sample. > So long as the filesystem only tries to migrate its own pagecache > pages, it should be okay (the locking for file pages is not problematic > as it is for anonymous - probably because we do insist on locking pages > before truncating or clearing the cache). But if it were to try to > migrate the anonymous pages COWed into a private file-based vma, > without any mmap_sem, then it would be unsafe. Unlikely mistake. pagecache pages are not in an anonymous vma and. pte information can be reconsituted from the mappings. So the page migration code currently simply removes the ptes for those. -- 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