Subject: Re: fsync performance hit on 1.6.1
To: der Mouse <mouse@Rodents.Montreal.QC.CA>
From: Chuck Silvers <chuq@chuq.com>
List: tech-kern
Date: 07/07/2003 09:39:04
for a unified-cache system like we have in 1.6 and later,
there's no coherency problem even if you switch back and forth
between read/write and mmap.  for non-unified-cache systems like
sunos 3.x this was probably a problem.  the only major non-unified-cache
system left that I know of these days (HP-UX) does flushing internally to
guarantee coherency for single-threaded applications even if they switch
interfaces and makes a best-effort attempt at coherency for multi-threaded
(or multi-process) accesses via different interfaces.

-Chuck


On Mon, Jul 07, 2003 at 03:53:33AM -0400, der Mouse wrote:
> Provided the writing and the reading use the same choice of interface
> (which primarily means, on the one hand, read() and write(), and on the
> other, mmap()), you shouldn't need to do any explicit syncs.  (You need
> to take care when mixing read/write and mmapped access, but not when
> all accesses use the same choice of interface.)
> 
> At least that's how I've always understood it, and that's been my
> experience.  I've been bitten occasionally by missing synchronization
> between users of different interfaces, but never otherwise.