From owner-cvs-src@FreeBSD.ORG Tue Apr 8 18:11:08 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F7B737B401; Tue, 8 Apr 2003 18:11:08 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3208443F75; Tue, 8 Apr 2003 18:11:07 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) h391AxKj060337; Tue, 8 Apr 2003 18:10:59 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.6p2/8.12.5/Submit) id h391AvtP060336; Tue, 8 Apr 2003 18:10:57 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Tue, 8 Apr 2003 18:10:57 -0700 From: David Schultz To: Soeren Schmidt Message-ID: <20030409011057.GA59991@HAL9000.homeunix.com> Mail-Followup-To: Soeren Schmidt , Alexander Leidinger , des@ofug.org, cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org, sos@FreeBSD.org References: <20030408153259.2a4b03ac.Alexander@Leidinger.net> <200304081356.h38Du7PF032425@spider.deepcore.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200304081356.h38Du7PF032425@spider.deepcore.dk> cc: src-committers@FreeBSD.ORG cc: cvs-src@FreeBSD.ORG cc: Alexander Leidinger cc: des@ofug.org cc: cvs-all@FreeBSD.ORG cc: sos@FreeBSD.ORG Subject: Re: cvs commit: src/sys/dev/ata ata-all.c ata-all.h ata-chipset.cata-dma.c ata-pci.c ata-pci.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Apr 2003 01:11:08 -0000 On Tue, Apr 08, 2003, Soeren Schmidt wrote: > It seems Alexander Leidinger wrote: > > Does this mean we can't use ATA-TQ in situations where we would use TQ > > without WC on a SCSI system (read: does it affect softupdates)? > > Well, this has newer been found out by hard evidence. The only vendor > doing tags capable ATA disks doesn't want to tell, so we cant really > know for sure. However tests here indicates that the "WC effect" is > not in action when tags are enabled, but I could just have been > unusually lucky... I think you just got lucky. Steve Byan wrote this on fs@ a few months ago: # ATA queuing is only useful for reads; ATA gets write-queuing by # delayed-write caching. ATA queuing only allows disconnecting # between sending the command and transferring the data; it # doesn't allow disconnecting between transferring the data and # transferring the status. Hence ATA queuing is useless for writes. So ATA tags are a performance hack *only*, and they are orthogonal to write caching. However, softupdates doesn't care about the absolute ordering of transactions; it just cares that you don't call 'biodone(x)' until 'x' has been committed to stable storage. In theory you might be able to safely enable write caching on ATA disks if you send a FLUSH CACHE command every now and then and wait for it to complete before making any calls to biodone(). For SCSI, I think write caching with command queuing works the way you would want it to for writes[1], but apparently it is necessary to set the FUA bit to force the device to commit the data before completing the command. Glancing at scsi_{da,all}.c, it doesn't appear to me that we do that. Comments from a SCSI guru would be appreciated. [1] Or so Google tells me. I don't know much about SCSI.