Subject: Re: fsync performance hit on 1.6.1
To: Daniel Brewer <tech-kern@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 07/07/2003 03:53:33
> For our application, we have 1 process capturing images from a
> frame-grabber and dumping them to a file in a memory file system.  It
> sends a UDP message to another process that reads the images from
> this file and writes them to disk in a database.  The first process
> has to guarantee that after it's done writing that image to the
> memory file system, that it is actually there for the second process
> to read.

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.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B