From owner-freebsd-stable Tue Mar 13 1:52: 8 2001 Delivered-To: freebsd-stable@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id 7F8F237B718; Tue, 13 Mar 2001 01:52:01 -0800 (PST) (envelope-from bright@fw.wintelcom.net) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id f2D9odl12219; Tue, 13 Mar 2001 01:50:39 -0800 (PST) Date: Tue, 13 Mar 2001 01:50:39 -0800 From: Alfred Perlstein To: Soren Schmidt Cc: Mike Meyer , Helge Oldach , 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> References: <20010313013301.L29888@fw.wintelcom.net> <200103130938.KAA95619@freebsd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200103130938.KAA95619@freebsd.dk>; from sos@freebsd.dk on Tue, Mar 13, 2001 at 10:38:30AM +0100 X-all-your-base: are belong to us. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * Soren Schmidt [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-stable" in the body of the message