From owner-freebsd-hackers Wed Sep 8 18:49:30 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from mail-out2.apple.com (mail-out2.apple.com [17.254.0.51]) by hub.freebsd.org (Postfix) with ESMTP id 5B59615C10 for ; Wed, 8 Sep 1999 18:49:19 -0700 (PDT) (envelope-from justin@rhapture.apple.com) Received: from mailgate1.apple.com (A17-128-100-225.apple.com [17.128.100.225]) by mail-out2.apple.com (8.9.3/8.9.3) with ESMTP id SAA23169 for ; Wed, 8 Sep 1999 18:48:40 -0700 (PDT) Received: from scv2.apple.com (scv2.apple.com) by mailgate1.apple.com (mailgate1.apple.com- SMTPRS 2.0.15) with ESMTP id for ; Wed, 08 Sep 1999 18:44:41 -0700 Received: from rhapture.apple.com (rhapture.apple.com [17.202.40.59]) by scv2.apple.com (8.9.3/8.9.3) with ESMTP id SAA26582 for ; Wed, 8 Sep 1999 18:44:39 -0700 (PDT) Received: (from justin@localhost) by rhapture.apple.com (8.9.1/8.9.1) id SAA02454 for freebsd-hackers@FreeBSD.ORG; Wed, 8 Sep 1999 18:44:39 -0700 (PDT) Message-Id: <199909090144.SAA02454@rhapture.apple.com> To: freebsd-hackers@freebsd.org Subject: Re: message queues for I/O (usenix paper) Date: Wed, 8 Sep 1999 18:44:38 -0700 From: "Justin C. Walker" Reply-To: justin@apple.com X-Mailer: by Apple MailViewer (2.105.dev) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > From: Jayson Nordwick > Date: 1999-09-08 17:38:56 -0700 > To: freebsd-hackers@FreeBSD.ORG > Subject: message queues for I/O (usenix paper) > Content-id: <66138.936837476.1@scam.XCF.Berkeley.EDU> > Delivered-to: freebsd-hackers@freebsd.org > X-Loop: FreeBSD.ORG > > There is alot of talk going on over at the linux-kernel mailing list > about implementing synchronous messaging for I/O. They are talking about > a paper that was presented at USENIX: > > http://www.cs.rice.edu/~gaurav/papers/usenix99.ps > > The general idea is that select() and poll() fall over with large numbers of > file descriptors for two reasons. First, scanning the interest list begins to > consume more time. Second, the stateless nature between calls means that > alot of redundant processing occurs. The solution these guys (the authors) > say is to have a way of registering interest in descriptors, then you can > call a procedure to find out what has changed since last time. > > I personally think that select() is just fine and can be implemented > more efficiently than currently, but I would be willing to give it a shot > at both cooperating with the Linux people to get a good Linux/FreeBSD > API layed down and then implementing it. > > I know some of you heard this paper presented so does anybody have any > ideas about it? > > Does anybody care? >From the FWIW department, we have, in the Darwin source, an implementation of a "select replacement" that is designed to get around some of the (perceived or real) issues with select(), e.g., looking at a long (FD_SETSIZE or larger) array of bits several times in the kernel and in user space. In the available sources, this is represented in sys/ev.h, and is implemented only for sockets. Our tests indicate a roughly 5-10% speed improvement when a lot of sockets are in use but not exuberantly so. For Darwin in the future (the Core OS for Mac OS X), this scheme will be somewhat generalized, to provide a uniform mechanism for fielding events from any subsystem. It will be made more interesting by the need to incorporate mach message handling in addition to file-descriptor-based events. Have a look, should this be of interest. I'll be happy to field questions, since the doc is a bit, oh, scant... Regards, Justin -- Justin C. Walker, Curmudgeon-At-Large * Institute for General Semantics | Manager, CoreOS Networking | When crypto is outlawed, Apple Computer, Inc. | Only outlaws will have crypto. 2 Infinite Loop | Cupertino, CA 95014 | *-------------------------------------*-------------------------------* To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message