Re: [PATCH] Polling > 16000 FDs

From: Matthias Urlichs (smurf@noris.net)
Date: Sat Jan 08 2000 - 07:27:11 EST


Hi,

Bill Wendling:

> + for (offset = 0; iter > 0; iter--, offset += NUM_POLLFDS) { [...]
> + fdcount += do_poll(fds_num, fds, wait, timeout);

You can't do this. Suppose I poll for 20000 descriptors with a timeout.
You'll hang in that loop until the timeout expires until getting around
to checking the second batch of file descriptors.

Instead, you need to pass a linked list of descriptors to do_poll, ideally
using a linked list of single kernel pages. The big 128-kByte allocation
will fail anyway, if the machine is tight on memory.

-- 
Matthias Urlichs  |  noris network GmbH   |   smurf@noris.de  |  ICQ: 20193661
The quote was selected randomly. Really.    |      http://www.noris.de/~smurf/
-- 
Guillotine: The inventor, a French physician, J. I. Guillotin, thought his
invention was a great humanitarian contribution: a speedier and more efficient
method than the drawn-out tortures which had been used previously for
administering the death penalty.

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



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:12 EST