From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Tue, 24 Jun 2008 21:19:37 +0100 (BST) From: Hugh Dickins Subject: Re: Can get_user_pages( ,write=1, force=1, ) result in a read-only pte and _count=2? In-Reply-To: <20080624151908.GO10062@sgi.com> Message-ID: References: <200806190329.30622.nickpiggin@yahoo.com.au> <200806191307.04499.nickpiggin@yahoo.com.au> <20080619133809.GC10123@sgi.com> <20080623155400.GH10123@sgi.com> <20080623175203.GI10123@sgi.com> <20080624151908.GO10062@sgi.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Robin Holt Cc: Nick Piggin , Ingo Molnar , Christoph Lameter , Jack Steiner , Rik van Riel , Lee Schermerhorn , linux-mm@kvack.org List-ID: On Tue, 24 Jun 2008, Robin Holt wrote: > OK. I just gave it a try and I still get a failure with this patch > applied. Thanks a lot for trying. That's disappointing, I don't understand it. Would it be possible for you to debug what is actually happening when this page is COWed? It seems to me that there's something else going on that we don't yet know about. > I can't help wondering if we (XPMEM, IB, etc) shouldn't be setting a > page flag indicating that the attempt to swap this page out should not > even be tried. I would guess this has already been discussed to death. > If so, I am sorry, but I missed those discussions. No, I don't think there's been any such discussion, apart from the http://lkml.org/lkml/2006/9/14/384 threads I indicated before. get_user_pages has always been very much about pinning a page in memory, despite attempts to swap it out. If you want to prevent the page from being pulled out of its pagetable, then use mlock(2); but it shouldn't be necessary, once we have that fix to the PageLocked case. Unless there's something else going on. 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