From owner-freebsd-hackers Sat Aug 2 16:02:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id QAA20328 for hackers-outgoing; Sat, 2 Aug 1997 16:02:28 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.50]) by hub.freebsd.org (8.8.5/8.8.5) with SMTP id QAA20320; Sat, 2 Aug 1997 16:02:22 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id QAA00445; Sat, 2 Aug 1997 16:02:10 -0700 From: Terry Lambert Message-Id: <199708022302.QAA00445@phaeton.artisoft.com> Subject: Re: non-blocking file i/o To: gpalmer@FreeBSD.ORG (Gary Palmer) Date: Sat, 2 Aug 1997 16:02:09 -0700 (MST) Cc: hackers@FreeBSD.ORG In-Reply-To: <7776.870502484@orion.webspan.net> from "Gary Palmer" at Aug 2, 97 02:14:44 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-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > A friend (who mainly does his devel under solaris/linux) recently came > up with a patch to the INN database code which made the writes > non-blocking. On linux/solaris, the non-blocking writes would take > fractions of a ms. On FreeBSD, the blocking write took 8ms and the > ``non-blocking'' write took 4ms (set using fcntl). It also seems that > Linux and Solaris use open(file, O_NONBLOCK, 0) to put the file into > non-blocking mode for reading and writing also, where our open flag > only affects the open. Are you confusion O_NONBLOCK with O_NDELAY? It used to be on SysV systems that O_NDELAY was "open without waiting for DCD on modem control devices" and *also* put the device into non-blocking mode. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.