From owner-freebsd-hackers Sat Jun 1 16:03:23 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id QAA08640 for hackers-outgoing; Sat, 1 Jun 1996 16:03:23 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id QAA08634 for ; Sat, 1 Jun 1996 16:03:21 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id PAA22318; Sat, 1 Jun 1996 15:59:16 -0700 From: Terry Lambert Message-Id: <199606012259.PAA22318@phaeton.artisoft.com> Subject: Re: Breaking ffs - speed enhancement? To: hdalog@zipnet.net Date: Sat, 1 Jun 1996 15:59:16 -0700 (MST) Cc: terry@lambert.org, hackers@freebsd.org In-Reply-To: <199606011103.HAA09983@hda> from "Peter Dufault" at Jun 1, 96 07:03:28 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > > This seems unlikely. O_ASYNC has to do with SIGIO for sockets. Perhaps > > > you mean O_FSYNC. O_FSYNC is a no-op in 4.4Lite and in FreeBSD. Perhaps > > > you mean MNT_ASYNC. MNT_ASYNC is (almost?) a no-op in 4.4Lite but is > > > partly implemented in FreeBSD. > > > > I mean whatever O_SYNC is in System V, which says whether to wait for > > the write request to complete before returning from the write request, > > or whether it's OK to stick the requests onto a queue which is allowed > > to be reordered by write optimization algorithms at their discretion. > > The O_SYNC flag is file based (the fcntl and open flags). There > is no POSIX O_FSYNC - there is O_SYNC for all metadata committed > to disk and O_DSYNC for "only that needed to retrieve the data" > committed to disk. Note that these flags require a synchronous > write for the data, resulting in more I/O instead of less and not > doing what Joe was trying to do. > > Even with _POSIX_SYNCHRONOUS_IO and nothing opened *SYNC (that is, > you can be as aggressive as you are clever), POSIX requires that > the file access times be updated when a "stat" or "fstat" happens > and when no process has the file open. This precludes a standard > way of efficiently handling files that are being rapidly opened > and closed where you don't care about the access times. I think > they should have changed this part of the spec when they defined > the sychronous I/O to let you only update the access fields when > the associated I/O takes place, permitting standard "aggressively > asynchronous" behavior. The kernel implementation has little or nothing to do with POSIX, which can just as easily be implemented in a library (as OS/2, NT, and VMS have proven). I am talking about the flag to the block I/O subsystem that causes the kernel operation that actually reads/writes disk blocks to require synchronous completion before allowing the continued usage of state as if it were idempotent. The name in SVR3 and SVR4 for this parameter flag was OSYNC, *NOT* O_SYNC. I typo'ed when I first wrote it. Please quit addressing this as if it were anything other than a kernel space issue. Thanks, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.