Re: Syslets, Threadlets, generic AIO support, v6
- From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 30 May 2007 14:27:52 -0700 (PDT)
On Wed, 30 May 2007, Ulrich Drepper wrote:
I don't like special cases. For me things better come in quantities 0,
1, and unlimited (well, reasonable high limit). Otherwise, who gets to
use that special namespace? The C library is not the only body of code
which would want to use descriptors.
Well, don't think of it as a special case at all: think of bit 30 as a
"the user asked for a non-linear fd".
In fact, to make it effective, I'd suggest literally scrambling the low
bits (using, for example, some silly per-boot xor value to to actually
generate the "true" index - the equivalent of a really stupid randomizer).
That way you'd have the legacy "linear" space, and a separate "non-linear
space" where people simply *cannot* make assumptions about contiguous fd
allocations. There's no special case there - it's just an extension which
explicitly allows us to say "if you do that, your fd's won't be allocated
the traditional way any more, but you *can* mix the traditional and the
non-linear allocation".
And then the semantics: do these descriptors should show up in
/proc/self/fd? Are there separate directories for each namespace? Do
they count against the rlimit?
Oh, absolutely. The'd be real fd's in every way. People could use them
100% equivalently (and concurrently) with the traditional ones. The whole,
and the _only_ point, would be that it breaks the legacy guarantees of a
dense fd space.
Most apps don't actually *need* that dense fd space in any case. But by
defaulting to it, we wouldn't break those (few) apps that actually depend
on it.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Follow-Ups:
- Re: Syslets, Threadlets, generic AIO support, v6
- From: William Lee Irwin III
- Re: Syslets, Threadlets, generic AIO support, v6
- From: David M. Lloyd
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Ulrich Drepper
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Davide Libenzi
- Re: Syslets, Threadlets, generic AIO support, v6
- References:
- Syslets, Threadlets, generic AIO support, v6
- From: Zach Brown
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Jeff Garzik
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Ingo Molnar
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Ulrich Drepper
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Ingo Molnar
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Davide Libenzi
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Linus Torvalds
- Re: Syslets, Threadlets, generic AIO support, v6
- From: Ulrich Drepper
- Syslets, Threadlets, generic AIO support, v6
- Prev by Date: Re: kexec and aacraid broken
- Next by Date: Re: GFP_DMA32 and PAE x86 machines
- Previous by thread: Re: Syslets, Threadlets, generic AIO support, v6
- Next by thread: Re: Syslets, Threadlets, generic AIO support, v6
- Index(es):