Re: [patch 01/22] update ctime and mtime for mmaped write

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Miklos Szeredi
Date: Wednesday, February 28, 2007 - 10:51 am

> While these entry points do not actually modify the file itself,

I disagree.

You don't worry about the timestamp being updated _during_ a large
write() call, even though the file is constantly being modified.

You think of write() as something instantaneous, while you think of
writing to a shared mapping, then doing msync() as something taking a
long time.  In actual fact both of these are basically equivalent
operations, the differences being, that you can easily modify
non-contiguous parts of a file with mmap, while you can't do that with
write.  The disadvantage from mmap comes from the cost of setting up
the page tables and handling the faults.

Think of it this way:

  shared mmap write + msync(MS_ASYNC)  ==  write()
  msync(MS_ASYNC) + fsync()  ==  msync(MS_SYNC)


I think this would just be a waste of CPU.

Miklos
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 01/22] update ctime and mtime for mmaped write, Miklos Szeredi, (Tue Feb 27, 4:14 pm)
Re: [patch 01/22] update ctime and mtime for mmaped write, Peter Staubach, (Wed Feb 28, 7:16 am)
Re: [patch 01/22] update ctime and mtime for mmaped write, Miklos Szeredi, (Wed Feb 28, 10:06 am)
Re: [patch 01/22] update ctime and mtime for mmaped write, Peter Staubach, (Wed Feb 28, 10:21 am)
Re: [patch 01/22] update ctime and mtime for mmaped write, Miklos Szeredi, (Wed Feb 28, 10:51 am)
Re: [patch 01/22] update ctime and mtime for mmaped write, Peter Staubach, (Wed Feb 28, 1:01 pm)
Re: [patch 01/22] update ctime and mtime for mmaped write, Miklos Szeredi, (Wed Feb 28, 1:35 pm)
Re: [patch 01/22] update ctime and mtime for mmaped write, Miklos Szeredi, (Wed Feb 28, 1:58 pm)
Re: [patch 01/22] update ctime and mtime for mmaped write, Peter Staubach, (Wed Feb 28, 2:09 pm)
Re: [patch 01/22] update ctime and mtime for mmaped write, Miklos Szeredi, (Thu Mar 1, 12:25 am)