Subject: Re: wd, disk write cache, sync cache, and softdep.
To: None <tech-kern@NetBSD.org>
From: Joerg Sonnenberger <email@example.com>
Date: 12/16/2004 22:01:35
On Fri, Dec 17, 2004 at 07:42:03AM +1100, Daniel Carosone wrote:
> On Thu, Dec 16, 2004 at 03:22:38PM -0500, J Chapman Flack wrote:
> > I've often wondered how the implications of hardware features like
> > write-back disk caches get addressed in higher software layers than
> > the OS code itself, such as the write-ahead log protocol in a database
> > engine. My long-standing suspicion has been that I would really rather
> > not know; I'm probably lucky if I'm using an OS that is really enforcing
> > what it thinks it's enforcing in filesystem integrity, and it's probably
> > more like a miracle if some DBMS I've installed is really
> > doing the right things needed to get its WALP updates all the way down
> > to the media. But I don't really know the state of the art. Do all
> > transactional DBMSs have an inescapably OS-specific layer of logging
> > code where for NetBSD it would set this flag, and for another OS do
> > something else? Is there any common practice existing or emerging that
> > we could track?
> It comes down to one of three things:
> - use raw devices
> - fsync()
> - aio
> All three of these things rely on the OS drivers knowing that the
> write is really-complete, and can be screwed by write-cache.
And all this kind of fail when faced with ATA-style write-back caching.
Don't we all love hardware which knows what is best for the (Microsoft) OS?