From owner-freebsd-hackers Mon Jan 29 11: 3:24 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 3DEA437B402 for ; Mon, 29 Jan 2001 11:03:07 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.11.1/8.11.1) id f0TJ2tx34193; Mon, 29 Jan 2001 11:02:55 -0800 (PST) (envelope-from rizzo) From: Luigi Rizzo Message-Id: <200101291902.f0TJ2tx34193@iguana.aciri.org> Subject: Re: [kernel patch] fcntl(...) to close many descriptors In-Reply-To: <200101291833.f0TIXDF67092@earth.backplane.com> from Matt Dillon at "Jan 29, 2001 10:33:13 am" To: dillon@earth.backplane.com (Matt Dillon) Date: Mon, 29 Jan 2001 11:02:45 -0800 (PST) Cc: usebsd@free.fr, n@nectar.com, drosih@rpi.edu, rizzo@aciri.org, hackers@FreeBSD.ORG, wollman@khavrinen.lcs.mit.edu X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > It doesn't solve anything. Besides, there is no such thing as a > perfect hash ... at least not one that has a small enough index range > to be useful in a table lookup. And, again, no real reason or need > to do such a thing. The kernel syscall is hardwired because it is > the defining interface between userland and kernelland, and hardwiring > it gives us the best, longest term stability in regards to portability. > We don't need to pollute it with fancy algorithms that we may decide > we have to 'adjust' every year or two. One of the reasons why binary i do not get the problem. The search key passed to the kernel would be just a string, just like open() and sysctlbyname() calls handle. And, this mechanism would be explicitly used for "non portable" or experimental functions (such as the closeall() which started the thread, or next time someone comes up with a start_http_server_thread()) and avoiding overloading an existing syscall or having to modify libc would be beneficial in terms of code clarity (you know what the thing is going to do) and portability. cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message