lkml.org 
[lkml]   [2008]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH -v6 2/2] Updating ctime and mtime for memory-mapped files
From
Date
> > 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?

But then background writeout, sync(2), etc, wouldn't update the times.
Dunno. I don't think actual _physical_ writeout matters much, so it's
not worse to be 30s early with the timestamp, than to be 30s or more
late.

Miklos


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