From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 27 Feb 2006 17:57:28 -0800 (PST) From: Christoph Lameter Subject: Re: unuse_pte: set pte dirty if the page is dirty In-Reply-To: <20060227175324.229860ca.akpm@osdl.org> Message-ID: References: <20060227175324.229860ca.akpm@osdl.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Andrew Morton Cc: hugh@veritas.com, linux-mm@kvack.org List-ID: On Mon, 27 Feb 2006, Andrew Morton wrote: > Are we sure this is race-free? Say, someone is in the process of cleaning > the page? munmap, conceivably swapout? We end up with a dirty pte > pointing at a now-clean page. The page will later become dirty again. Is > that a problem? It would generate a surprise if the vma had ben set > read-only in the interim, for example. munmap sets the dirty bit in pages rather than clearing the dirty bits. If we would set a dirty bit in a pte pointing to a now clean page then unmapping (or the swaper) will mark the page dirty again and its going to be rewritten again. -- 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