Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 1995 19:10:53 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        kaleb@x.org (Kaleb S. KEITHLEY)
Cc:        terry@lambert.org, hackers@freefall.freebsd.org
Subject:   Re: getdtablesize() broken?
Message-ID:  <199510170210.TAA26181@phaeton.artisoft.com>
In-Reply-To: <199510161939.PAA08113@exalt.x.org> from "Kaleb S. KEITHLEY" at Oct 16, 95 03:39:29 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> >Poll, anyone?
> 
> >Poll is inferior to select, 
> 
> Debatable.

Not.  8-).

> >both because of the 10ms limit on timeout
> >resoloution 
> 
> Man pages only say that if the host does not support millisecond
> accuracy then the value is rounded up to the nearest legal value
> available.

10ms is the argument resoloution.  On Solaris, it's 10ms, while select()
is till 4uS.  select() wins.  8-).

> That hasn't been my experience. poll(0, NULL, 10000); waits 10 seconds
> on SunOS, all SVR4-en I have here, HPUX, and AIX; however Digital Unix's
> poll looses. In fact in SVR4 select(3) is implemented using poll(2).

That's a bug in SVR4.  SVR4 is broken and bogus in many, many ways.

That's why this is "FreeBSD" instead of "FreeSVR4".  8-).

Dec's poll() is based on the Mentat streams code.  I'm suprised they
didn't roll in the fixed Robert Withrow and I put in when writing
the Pathworks for VMS (NetWare) server.  I had to fix that and several
other things, including some DEC Bliss code, to get a working process
model.  I believe the SAP thread used a poll with a 0 timeout.

The final code used Timer Queue Entry AST's, but the effect was the
same.

> In theory poll could be more efficient because there's less bit
> twiddling to do and unless you're polling thousands of files poll
> needs to transfer far less data to the kernel address space. Back
> in the days of 1.1.5.1 I started to look at what it would take to
> add poll. Maybe I'll look again.

I agree that it could, though I'd want a timeval struct instead of an
integer time value implicitly limited to a 10ms resoloution by its units.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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