Date: Mon, 09 Jul 2007 15:00:21 +0800 From: LI Xin <delphij@delphij.net> To: Robert Watson <rwatson@FreeBSD.org> Cc: FreeBSD Hackers <freebsd-hackers@freebsd.org>, d@delphij.net, Julian Elischer <julian@elischer.org>, Ed Schouten <ed@fxq.nl> Subject: Re: add closefrom() call Message-ID: <4691DD05.2090407@delphij.net> In-Reply-To: <20070706174321.M17956@fledge.watson.org> References: <de5dfb5a0707041727j3e3518f9l5a019717a9f90aa@mail.gmail.com> <20070705122650.GE1302@britannica.bec.de> <468E16E6.6030608@delphij.net> <20070706112453.GA3217@hoeg.nl> <468E7007.5050607@elischer.org> <20070706174321.M17956@fledge.watson.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] Robert Watson wrote: > The Solaris implementation appears to implement two strategies: > > (1) If procfs is mounted, list the fd directory to get a list of open fds, > then close those by number. > > (2) If procfs is not mounted, query the number of open fds using the > resource > limit interface, then sequentially close until the right number close. > > 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, -- Xin LI <delphij@delphij.net> http://www.delphij.net/ FreeBSD - The Power to Serve! [-- Attachment #2 --] -----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-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4691DD05.2090407>
