Re: [PATCH] FD array expansion problem

Andrea Arcangeli (andrea@suse.de)
Sat, 30 Oct 1999 21:13:53 +0200 (CEST)


On Sat, 30 Oct 1999, Alan Cox wrote:

>Its then much more obvious what is going on

What you propose is a semantic change and it's not related to the fix
IMHO.

Personally I like to continue to ask to expand_fdset this:

"enlarge the fdset to N bitflags"

And N is the number of bitflags that you want in the fdset array.

It's like when you alloc an array in C:

unsigned long array[1];

you want 1 element in the array.

Also consder that changing the semantic won't improve performances
as the expand_fdset is not going to happen often as it won't enlarge
the fdset of only 1 bit at time ;).

While instead it may happen often that you fork with a large fd set
allocated, and for fork() the current semantic is the faster one:

if (size > __FD_SETSIZE) {
expand_fdset(newf, oldf->maxfdset);

Andrea

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