Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Aug 1997 19:53:19 -0400
From:      "Gary Palmer" <gpalmer@FreeBSD.ORG>
To:        Terry Lambert <terry@lambert.org>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: non-blocking file i/o 
Message-ID:  <21590.870565999@orion.webspan.net>
In-Reply-To: Your message of "Sat, 02 Aug 1997 16:02:09 PDT." <199708022302.QAA00445@phaeton.artisoft.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
Terry Lambert wrote in message ID
<199708022302.QAA00445@phaeton.artisoft.com>:
> > 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?

There is no difference on FreeBSD. For files, they are both NOPS.

> 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.

No idea. I don't have a linux/solaris system to play with (not quite
true, but I'm not touching the Solaris/x86 box here more than I have
to). All I *DO* know, is when the file was opened with O_NONBLOCK,
both Solaris and Linux recorded write() times in fractions of a
milisecond. FreeBSD consistantly recorded write() times in the order
of 8ms on my test box.

Gary
--
Gary Palmer                                          FreeBSD Core Team Member
FreeBSD: Turning PC's into workstations. See http://www.FreeBSD.ORG/ for info



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?21590.870565999>