Skip site navigation (1)Skip section navigation (2)
Date:      07 Jul 2005 09:57:08 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: disk write barriers
Message-ID:  <44r7eara6j.fsf@be-well.ilk.org>
In-Reply-To: <200507061318.j66DIrHx000895@drjekyll.mkbuelow.net>
References:  <200507061318.j66DIrHx000895@drjekyll.mkbuelow.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Matthias Buelow <mkb@incubus.de> writes:

> Now my question is: Does FreeBSD also implements these barriers, or an
> equivalent mechanism, as claimed on the above URL?

Do you have a background in OS design?  It affects the answer, because
you seem to be referring to access barriers and disk cache flushes
interchangeably, which doesn't make sense, especially on
multiprocessor systems.

>                                                    If it does, why then
> the frequent advice to disable write-back caching? Or is that only for
> the couple drives that ignore any flush cache/disable wb commands? 

The problem with caching has nothing to do with flushing the cache; if
you flush the cache often, there's no advantage to using it anyway.
The whole speedup from using on-disk caching comes from the fact that
the drive reorders the writes at will, and lies to the operating
system by saying the writes are done when they aren't.  Among other
obvious problems, this negates the careful ordering calculated by
softupdates.

>                                                                    I
> know my drive doesn't ignore that command (since performance drops
> sharply, when I disable the cache), so I would be on the safe side.

This doesn't follow.  Just because you know that your drive supports
disabling the cache does not mean that it is safe to do so.

> Would it be possible to get an authoritative statement from a FreeBSD
> developer here on that matter?

Could depend on how much you're willing to pay them.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44r7eara6j.fsf>