Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Sep 2003 01:35:30 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Jeff Roberson <jroberson@chesapeake.net>
Cc:        "Jim C. Nasby" <jim@nasby.net>
Subject:   Re: Best disk caching method (and PGSQL performance)
Message-ID:  <3F5EE252.123E5C9@mindspring.com>
References:  <20030908210307.B12093-100000@mail.chesapeake.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Jeff Roberson wrote:
> On Fri, 5 Sep 2003, Terry Lambert wrote:
> > And as the comments point out, it lacks the introspection to
> > know dirty pages from clean ones, so all pages that are in
> > core and associated with the object are written, not just
> > the dirty ones.  Avoid this, if possible.
> 
> This is not accurate at all.  Please see vfs_subr.c's vop_stdfsync().  We
> walk the dirty block head and flush those buffers that are dirty.

Sorry, you're absolutely right!

It's msync which sucks because it ignores the start address and
length arguments, not fsync.  The reason fsync sucks is that it
lacks start location and end arguments.  So you end up writing
out everything with both of them, even when all you want is to
write one page of a 1G file.

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3F5EE252.123E5C9>