From owner-freebsd-scsi@FreeBSD.ORG Sat Dec 6 20:03:42 2003 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BB39016A4CE; Sat, 6 Dec 2003 20:03:42 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id D152143FBF; Sat, 6 Dec 2003 20:03:40 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id PAA08954; Sun, 7 Dec 2003 15:03:35 +1100 Date: Sun, 7 Dec 2003 15:03:34 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Nate Lawson In-Reply-To: <20031206164352.K33312@root.org> Message-ID: <20031207143335.W7451@gamplex.bde.org> References: <200312061929.hB6JTpeF042644@gw.catspoiler.org> <20031206164352.K33312@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-scsi@freebsd.org cc: Don Lewis Subject: Re: More Adaptec 29320 + Seagate ST336607LW woes X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Dec 2003 04:03:42 -0000 On Sat, 6 Dec 2003, Nate Lawson wrote: > On Sat, 6 Dec 2003, Don Lewis wrote: > > > > One place where folks have noticed a performance difference between WCE > > on and WCE off is when using newfs after we got rid of the buffered > > block devices and forced newfs to use the raw character device. Newfs > > ... > > Great explanation. We should probably add write clustering to newfs at > some point. Ugh. We should implement disk devices properly (which requires buffered block devices), not implement buffering in all applications that might benefit from using them. I think fsck would benefit more than newfs from buffering because it has a similar or more random access pattern (does it?) and it is used more. The old implementation of buffered block devices was so bad that nothing except very random accesses benefited much from it, and it made newfs much slower at least when I tried it 10+ years ago on drives without tagged queuing (maybe without write caching too). (I stopped using buffered block devices for newfs after that, but changes in drive technology may have made buffered devices more useful agin before they were axed.) The main badnesses in the old implementation were a too-small non-application-controllable block size of 2K and missing support for clustering. newfs and fsck are missing the fsync()'s needed to make them safe to use on buffered devices and regular files, and specfs_fsync() was buggy. Bruce