lkml.org 
[lkml]   [2008]   [Jan]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -v8 4/4] The design document for memory-mapped file times update
From
Date
> 
> Miklos, thanks for your program. Its output is given below.
>
> debian:~/miklos# mount | grep mnt
> tmpfs on /mnt type tmpfs (rw)
> debian:~/miklos# ./miklos /mnt/file
> begin 1201089989 1201089989 1201085868
> write 1201089990 1201089990 1201085868
> mmap 1201089990 1201089990 1201089991
> store b 1201089992 1201089992 1201089991
> msync 1201089992 1201089992 1201089991
> store c 1201089994 1201089994 1201089991
> msync 1201089994 1201089994 1201089991
> store d 1201089996 1201089996 1201089991
> munmap 1201089996 1201089996 1201089991
> close 1201089996 1201089996 1201089991
> sync 1201089996 1201089996 1201089991
> debian:~/miklos# ./miklos /mnt/file -r
> begin 1201090025 1201090025 1201089991
> write 1201090026 1201090026 1201089991
> mmap 1201090026 1201090026 1201090027
> fetch x 1201090026 1201090026 1201090027
> store b 1201090026 1201090026 1201090027
> msync 1201090026 1201090026 1201090027
> fetch y 1201090026 1201090026 1201090027
> store c 1201090032 1201090032 1201090027
> msync 1201090032 1201090032 1201090027
> fetch z 1201090032 1201090032 1201090027
> store d 1201090036 1201090036 1201090027
> munmap 1201090036 1201090036 1201090027
> close 1201090036 1201090036 1201090027
> sync 1201090036 1201090036 1201090027
> debian:~/miklos#
>
> I think that after the patches applied the msync() system call does
> everything, which it is expected to do. The issue you're now talking
> about is one belonging to do_fsync() and the design of the tmpfs
> driver itself, I believe.

Right. My problem is that msync() does _too_much_ for ram-backed
mappings. It shouldn't write protect pages in this case, because it
has a high cost and dubious value.

Similar argument probably holds for file_update_time() from the fault
handlers. They should examine, if it's a ram-backed fs (with
mapping_cap_account_dirty()) and not update the times for those.

It's better to consistently not update the times, than to randomly do
so, which could lead to false expectations, and hard to track down
bugs.

Miklos


\
 
 \ /
  Last update: 2008-01-23 14:59    [W:0.067 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site