title: What updates mtime after writing to memory mapped files?
body: <p>I'm using XFS on Linux and have a memory mapped file to which I write once per second.  I notice that the file mtime (shown by <code>watch ls --full-time</code>) changes periodically but irregularly.  The gap between mtimes seems to be between 2 and 20 seconds but it is not consistent.  There is very little else running on the system--in particular there's only one program of mine writing the file, plus one reading.</p>
  
  <p>The same program writes much more frequently to some other mmapped files, and their mtime changes exactly once per 30 seconds.</p>
  
  <p>I am not using <code>msync()</code> (which would update mtime when called).</p>
  
  <p>My questions:</p>
  
  <ol>
  <li>What updates mtime?</li>
  <li>Is the update interval configurable?</li>
  <li>Why do some mtimes get updated exactly once per 30 seconds but some files which I write less frequently have fresher (irregular but always less than 30 seconds old) mtimes?</li>
  </ol>