lkml.org 
[lkml]   [2002]   [Jun]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 2.4.18 no timestamp update on modified mmapped files
On Sat, Jun 15, 2002 at 07:12:30PM +1000, Kevin Easton wrote:
> Hmm.. so how do such pages get marked dirty on architectures that don't
> do it in hardware ("most RISC architectures" according to a comment in
> memory.c)? Is the entire mapping made dirty when the write permissions
> are added?

No. You only give user space write access when the write access _and_
"Linux dirty bit" are set. This means you fault when user space tries
to write to the page, which means you can set the dirty bit. This is
what the following code is doing (if write_access is required and the
pte already has write permission, then set the dirty bit):

if (write_access) {
if (!pte_write(entry))
return do_wp_page(mm, vma, address, pte, pmd, entry);

entry = pte_mkdirty(entry);
}

--
Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:1.093 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site