Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2001 01:50:39 -0800
From:      Alfred Perlstein <bright@wintelcom.net>
To:        Soren Schmidt <sos@freebsd.dk>
Cc:        Mike Meyer <mwm@mired.org>, Helge Oldach <Helge.Oldach@de.origin-it.com>, oberman@es.net, mobile@FreeBSD.ORG, stable@FreeBSD.ORG
Subject:   Re: Disk I/O problem in 4.3-BETA
Message-ID:  <20010313015039.P29888@fw.wintelcom.net>
In-Reply-To: <200103130938.KAA95619@freebsd.dk>; from sos@freebsd.dk on Tue, Mar 13, 2001 at 10:38:30AM %2B0100
References:  <20010313013301.L29888@fw.wintelcom.net> <200103130938.KAA95619@freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
* Soren Schmidt <sos@freebsd.dk> [010313 01:38] wrote:
> It seems Alfred Perlstein wrote:
> > 
> > Having write caching on is like having the disk ignore _any_
> > filesystem's attempt to do softupdates/logging/delayed-order-writes
> > because the disk _lies_ to the OS about when a write is safely on
> > the disk.
> 
> Hmm, I think the problem here is that the OS doesn't tell the
> drivers WHEN it expects to have data written to disk, I can't
> see why it should not be possible to have even softupdates
> say "now before I write this I expect everything so far to 
> be on disk".

It doesn't expect that, it just expects you to block until that
specific write is on disk.  And you're probably right that there's
no propogation of this request down to the disk driver level,
and yes that's a bug.

I said a while back that the most simple "fix" for this was to
add another variant of bwrite() that asked for write-through
behavior.

The reason why simply changing bwrite() to do this is a bad idea
is because afaik when there's a lack of buffer space and the kernel
is desperately trying to flush buffers it calls bwrite().

In that case, since most likely normal data is being written you
_want_ write caching for performance.

The reason bwrite() is used instead of bawrite() when we're low on
memory is because writes may need additional bufferspace to pull
in the indirect blocks, and if you bawrite the data you may wind
up deadlocking.

Or something like that. :)

-- 
-Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org]
Daemon News Magazine in your snail-mail! http://magazine.daemonnews.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message




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