From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Wed, 24 May 2006 15:57:34 +0100 (BST) From: Hugh Dickins Subject: Re: remove VM_LOCKED before remap_pfn_range and drop VM_SHM 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: Peter Zijlstra , Andrew Morton , Linus Torvalds , David Howells , Rohit Seth , linux-mm@kvack.org, linux-kernel@vger.kernel.org List-ID: On Tue, 23 May 2006, Christoph Lameter wrote: > > Remove VM_LOCKED before remap_pfn range from device drivers and get rid of > VM_SHM. Okay, that is rather a nice cleanup. I've held off from doing it, and have discouraged one or two others from doing it, because there's a number of other things to be checked thereabouts (witness the way vfc_dev.c is or'ing flags it has no business to change: but you've rightly preserved that existing behaviour for now, however bad it may be); and there's VM_RESERVED (or most of its or'ings) to be removed too. But what you have looks nice, and no way does it prevent further cleanup later; though I've not wanted to bother maintainers repeatedly. Of course, you don't need this patch in order to proceed with migrating VM_LOCKED areas, because this patch is no more than a cleanup of irrelevance. Well, somewhat worse than irrelevance: when a driver unilaterally sets VM_LOCKED on a vma, then mm->locked_vm goes wild when the vma is unmapped: doesn't matter at exit, but bad if before. > remap_pfn_range() already sets VM_IO. There is no need to set VM_SHM since > it does nothing. VM_LOCKED is of no use since the remap_pfn_range does > not place pages on the LRU. The pages are therefore never subject to > swap anyways. Remove all the vm_flags settings before calling > remap_pfn_range. > > After removing all the vm_flag settings no use of VM_SHM is left. > Drop it. > > Signed-off-by: Christoph Lameter Acked-by: Hugh Dickins -- 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