From owner-freebsd-current@FreeBSD.ORG Mon Jul 26 22:51:46 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 935C816A4CE; Mon, 26 Jul 2004 22:51:46 +0000 (GMT) Received: from gw.catspoiler.org (217-ip-163.nccn.net [209.79.217.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4BE5043D3F; Mon, 26 Jul 2004 22:51:46 +0000 (GMT) (envelope-from truckman@FreeBSD.org) Received: from FreeBSD.org (mousie.catspoiler.org [192.168.101.2]) by gw.catspoiler.org (8.12.11/8.12.11) with ESMTP id i6QMoxpp058509; Mon, 26 Jul 2004 15:51:03 -0700 (PDT) (envelope-from truckman@FreeBSD.org) Message-Id: <200407262251.i6QMoxpp058509@gw.catspoiler.org> Date: Mon, 26 Jul 2004 15:50:59 -0700 (PDT) From: Don Lewis To: scottl@FreeBSD.org In-Reply-To: <20040726155712.R32601@pooker.samsco.org> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii cc: ma@dt.e-technik.uni-dortmund.de cc: current@FreeBSD.org cc: bugghy@home.ro Subject: Re: magic sysrq keys functionality X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2004 22:51:46 -0000 On 26 Jul, Scott Long wrote: > On Mon, 26 Jul 2004, Matthias Andree wrote: >> BTW, is proper write order guaranteed on SCSI drives through ordered >> tags? softdep doesn't really like blocks being written in different >> order than scheduled. >> > > I don't believe that any order is guaranteed. FreeBSD used to have the > concept of a B_ORDERED bio flag that would help order the bioq, but it was > removed early in the 5-current cycle due to apparent non-use. It's tough > to rely on ATA Flush Cache since many devices exist that advertise it but > don't actually support it (i.e. they lock up if you try it). SCSI > certainly supports it, but again it was information that was never getting > to the device. We don't care in the SCSI case as long as write caching is disabled on the drive. The drive is free to optimize the order of the set of commands that have been submitted to it as long as it doesn't return the completion status until the data hits the platter. Softdep won't send any write commands to the drive that are dependent on any outstanding write commands until it gets the completion status, which is how it enforces the ordering of a sequence of writes when it cares about the order. The important thing to remember is use camcontrol to turn off the WCE bit, since every drive I've purchased in the last several years has it turned on. If you forget that, you can even get hosed if you think you are doing synchronous writes (either in the file system code or with fsync()). When soft-updates is enabled, I don't see any significant performance difference between the WCE enabled and disabled cases in my normal system usage.