From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 9 07:00:39 2007 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6FC3616A41F; Mon, 9 Jul 2007 07:00:39 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id 4B6F413C455; Mon, 9 Jul 2007 07:00:38 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id E8BACEB5599; Mon, 9 Jul 2007 15:00:33 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id RYm2-Ej3AdiJ; Mon, 9 Jul 2007 15:00:28 +0800 (CST) Received: from LI-Xins-MacBook.local (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 07870EB5595; Mon, 9 Jul 2007 15:00:28 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:reply-to:organization:user-agent: mime-version:to:cc:subject:references:in-reply-to: x-enigmail-version:openpgp:content-type; b=M1xsPtU4czbz4Y5rKgebVbM2cOyh0/kugwjUzJdIc7ElMMiaqpyAEqvqhu+89bfmD Xuzk9XWGBYs1I3iOH3P9w== Message-ID: <4691DD05.2090407@delphij.net> Date: Mon, 09 Jul 2007 15:00:21 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 2.0.0.4 (Macintosh/20070604) MIME-Version: 1.0 To: Robert Watson References: <20070705122650.GE1302@britannica.bec.de> <468E16E6.6030608@delphij.net> <20070706112453.GA3217@hoeg.nl> <468E7007.5050607@elischer.org> <20070706174321.M17956@fledge.watson.org> In-Reply-To: <20070706174321.M17956@fledge.watson.org> X-Enigmail-Version: 0.95.2 OpenPGP: url=http://www.delphij.net/delphij.asc Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig81B7DCE97DE52E2C444B710B" Cc: FreeBSD Hackers , d@delphij.net, Julian Elischer , Ed Schouten Subject: Re: add closefrom() call X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: d@delphij.net List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2007 07:00:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig81B7DCE97DE52E2C444B710B Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Robert Watson wrote: > The Solaris implementation appears to implement two strategies: >=20 > (1) If procfs is mounted, list the fd directory to get a list of open f= ds, > then close those by number. >=20 > (2) If procfs is not mounted, query the number of open fds using the > resource > limit interface, then sequentially close until the right number clo= se. >=20 > Hence my question as to whether there's actually a big benefit or not -= - > do we think closefrom() is a performance-critical function? Nope. I will try to see if we have some way to expose lastfile to userland, or whether we have some better approach to implement this in userland next week if I would have some spare time... Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig81B7DCE97DE52E2C444B710B Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGkd0FOfuToMruuMARCmsbAJ9svdtYrisLLES1xLoAxkRc0AYUVgCfZHY1 H8Zpj5K7/RH9PgXbQbAJ+Lc= =Aucr -----END PGP SIGNATURE----- --------------enig81B7DCE97DE52E2C444B710B--