[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.0.98.0705301422230.26602@woody.linux-foundation.org>
Date: Wed, 30 May 2007 14:27:52 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Ulrich Drepper <drepper@...hat.com>
cc: Ingo Molnar <mingo@...e.hu>, Jeff Garzik <jeff@...zik.org>,
Zach Brown <zach.brown@...cle.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Arjan van de Ven <arjan@...radead.org>,
Christoph Hellwig <hch@...radead.org>,
Andrew Morton <akpm@....com.au>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Evgeniy Polyakov <johnpol@....mipt.ru>,
"David S. Miller" <davem@...emloft.net>,
Suparna Bhattacharya <suparna@...ibm.com>,
Jens Axboe <jens.axboe@...cle.com>,
Thomas Gleixner <tglx@...utronix.de>
Subject: Re: Syslets, Threadlets, generic AIO support, v6
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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists