Re: > 15,000 Simultaneous Connections

Mike Jagdis (mike@roan.co.uk)
Tue, 7 Sep 1999 10:43:31 +0100 (GMT/BST)


On Mon, 6 Sep 1999, Jason Nordwick wrote:

> Can you elaborate as to why it is not possible to remember interesting
> descriptors in the blocking case?

The kernel side can't remember fd sets because there is no way
for it to figure out if the sets have changed between calls
other than by scanning through them. Furthermore it has no way
of knowing if an fd was checked in a previous call and no way
of knowing if the descriptor changed in the meantime. So it has
to check every interesting fd to see if it is ready or not.
As a consequence of this stateless behaviour select and poll
are defined to check and return the state of _every_ fd of
interest when you might well have been happy to be told about
the first n ready fds a hundred times sooner.

Mike

-- 
    A train stops at a train station, a bus stops at a bus station.
    On my desk I have a work station...
.----------------------------------------------------------------------.
|  Mike Jagdis                  |  Internet:  mailto:mike@roan.co.uk   |
|  Roan Technology Ltd.         |                                      |
|  2 Markham Mews, Broad Street |  Telephone:  +44 118 989 0403        |
|  Wokingham ENGLAND            |  Fax:        +44 118 989 1195        |
`----------------------------------------------------------------------'

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/