Journaling filesystems

Russ Allbery rra at stanford.edu
Tue Nov 5 02:55:08 UTC 2002


Jeffrey M Vinocur <jeff at litech.org> writes:
> On 28 Oct 2002, dsr+inn at mail.lns.cornell.edu wrote:

>> Closing the file should[1] force a synchronous update.  So should[1]
>> an msync with the MS_SYNC flag.

> I tried to test this, but I'm not able to make mmapped writes *not* be
> visible even without any msync at all -- I don't know if the kernel is
> detecting another reader and handling that "nicely" (either flushing to
> disk then or reading the data out of the mmapped copy) or what.

The kernel is detecting another reader.  That's one of the advantages of a
merged buffer and page cache; you don't have to worry about msyncing
except when it's critical that things end up on disk, since all regular
file readers will see the new data without having to write it out to disk.

Hm.  I wonder if Solaris UFS with logging has this same problem.

>> convert some of the MS_ASYNCs to MS_SYNC (may require substantial
>> meditation on the code to identify the right subset of msync()s),

> *mumble* *sigh*

I expect that MS_SYNC will drive tradindexed performance through the
floor, given the amount that it syncs, but I could be surprised.

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>

    Please send questions to the list rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.


More information about the inn-workers mailing list