Re: [Patch] Polling on more than 16000 file descriptors

From: Jamie Lokier (lkd@tantalophile.demon.co.uk)
Date: Tue Jan 18 2000 - 12:02:35 EST


Tigran Aivazian wrote:
> On Tue, 18 Jan 2000, Jamie Lokier wrote:
> > If you're going that, you may as well use PAGE_SIZE allocations. And
> > then you may as well link the pages together using a pointer at the
> > start, to remove the arbitrary limit.
>
> agree with the first part (PAGE_SIZE allocation) but not necessarily agree
> with making it a linked list at all times because that means performance
> overhead in cases where it needn't be.

Does it need to do direct lookups by index? I am under the impression
that the code simply iterates over the poll structures, perhaps with
back pointers, but I haven't actually read it :-)

You could use a table indirection scheme for speedy lookups: one page is
an array of pointers to the other pages. If the indirection array is
very small, i.e. usually just 1 entry, you don't bother allocating the
indirection page.

enjoy,
-- Jamie

-
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 : Sun Jan 23 2000 - 21:00:18 EST