From owner-freebsd-chat Fri Oct 27 8:21: 4 2000 Delivered-To: freebsd-chat@freebsd.org Received: from smtp1.cern.ch (smtp1.cern.ch [137.138.128.38]) by hub.freebsd.org (Postfix) with ESMTP id 81F6537B479 for ; Fri, 27 Oct 2000 08:21:02 -0700 (PDT) Received: from pcep-jamie.cern.ch (pcep-jamie.cern.ch [137.138.38.126]) by smtp1.cern.ch (8.9.3/8.9.3) with ESMTP id RAA23705; Fri, 27 Oct 2000 17:20:35 +0200 (MET DST) Received: (from jamie@localhost) by pcep-jamie.cern.ch (8.9.3/8.9.3) id RAA29699; Fri, 27 Oct 2000 17:20:07 +0200 Date: Fri, 27 Oct 2000 17:20:06 +0200 From: Jamie Lokier To: Alfred Perlstein Cc: David Schwartz , Jonathan Lemon , chat@FreeBSD.ORG, linux-kernel@vger.kernel.org Subject: Re: kqueue microbenchmark results Message-ID: <20001027172006.A28504@pcep-jamie.cern.ch> References: <20001025172702.B89038@prism.flugsvamp.com> <20001025161837.D28123@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20001025161837.D28123@fw.wintelcom.net>; from bright@wintelcom.net on Wed, Oct 25, 2000 at 04:18:37PM -0700 Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Alfred Perlstein wrote: > > If a programmer does not ever wish to block under any circumstances, it's > > his obligation to communicate this desire to the implementation. Otherwise, > > the implementation can block if it doesn't have data or an error available > > at the instant 'read' is called, regardless of what it may have known or > > done in the past. > > Yes, and as you mentioned, it was _bugs_ in the operating system > that did this. Not for writes. POLLOUT may be returned when the kernel thinks you have enough memory to do a write, but someone else may allocate memory before you call write(). Or does POLLOUT not work this way? For read, you still want to declare the sockets non-blocking so your code is robust on _other_ operating systems. It's pretty straightforward. -- Jamie To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message