From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Fri, 18 Jan 2008 10:43:35 -0800 (PST) From: Linus Torvalds Subject: Re: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files In-Reply-To: Message-ID: References: <12006091182260-git-send-email-salikhmetov@gmail.com> <12006091211208-git-send-email-salikhmetov@gmail.com> <1200651337.5920.9.camel@twins> <1200651958.5920.12.camel@twins> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org Return-Path: To: Miklos Szeredi Cc: peterz@infradead.org, salikhmetov@gmail.com, linux-mm@kvack.org, jakob@unthought.net, linux-kernel@vger.kernel.org, valdis.kletnieks@vt.edu, riel@redhat.com, ksm@42.dk, staubach@redhat.com, jesper.juhl@gmail.com, akpm@linux-foundation.org, protasnb@gmail.com, r.e.wolff@bitwizard.nl, hidave.darkstar@gmail.com, hch@infradead.org List-ID: On Fri, 18 Jan 2008, Miklos Szeredi wrote: > > That would need a new page flag (PG_mmap_dirty?). Do we have one > available? Yeah, that would be bad. We probably have flags free, but those page flags are always a pain. Scratch that. How about just setting a per-vma dirty flag, and then instead of updating the mtime when taking the dirty-page fault, we just set that flag? Then, on unmap and msync, we just do if (vma->dirty-flag) { vma->dirty_flag = 0; update_file_times(vma->vm_file); } and be done with it? Linus -- 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