Date: Tue, 13 Apr 2004 08:52:32 +0800 From: Xin LI <delphij@frontfree.net> To: Julian Elischer <julian@elischer.org> Cc: Tim Robbins <tjr@freebsd.org> Subject: Re: JKH project.. Message-ID: <20040413005232.GA2959@frontfree.net> In-Reply-To: <Pine.BSF.4.21.0404121646330.9723-100000@InterJet.elischer.org> References: <20040412233701.GA71177@cat.robbins.dropbear.id.au> <Pine.BSF.4.21.0404121646330.9723-100000@InterJet.elischer.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--/04w6evG8XlLl3ft Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 12, 2004 at 04:50:18PM -0700, Julian Elischer wrote: > On Tue, 13 Apr 2004, Tim Robbins wrote: [...] > > On Sun, Apr 11, 2004 at 03:51:45PM -0700, Julian Elischer wrote: > >=20 > > > the fork syscall has to check the new PID against all exixting pids.. > > >=20 > > > here's the current code.. when teh PID-space starts becoming > > > "fragmented.." this starts to take "real time". > > [...] > > > with several thousand processes, forking a lot, this starts to take= =20 > > > a 'noticable' amount of time. > >=20 > > I've been using a hashtable-based PID allocator for the last few months. > > I didn't have enough time to run any serious benchmarks, so I never > > committed it. If the amount of time is noticeable in your environment, > > would you mind trying the patch below? > >=20 [...] >=20 > Well what you've done seems to fit my definition of "improved".. >=20 > anyone got comments? If memory serves me right, there's a benchmark done by David Schultz earlier this year, which is done to compare the NetBSD's PID Allocator ported by Jun Su[1,2] with Tim's hash based allocator[3] in p4. The benchmark report is available here: http://people.freebsd.org/~das/pbench/pbench.html [1] Jun Su's original patch http://www.arbornet.org/~junsu/pid.diff [2] Jun Su's patch I maintained locally to adopt latest -CURRENT changes http://research.delphij.net/freebsd/pid.diff [3] Tim's patch in p4 http://perforce.freebsd.org/chv.cgi?CH=3D43361 There were a discussion in current@ in February, for reference: My first post in January as a "Call for testers": http://lists.freebsd.org/pipermail/freebsd-current/2004-January/019940.html Jun Su's post about update of his patch: http://lists.freebsd.org/pipermail/freebsd-current/2004-February/020503.ht= ml David Schultz's post of his benchmark: http://lists.freebsd.org/pipermail/freebsd-current/2004-February/020807.ht= ml John's opinion: http://lists.freebsd.org/pipermail/freebsd-current/2004-February/020957.ht= ml There're many other discussions during this, which is valuable to read. I personally prefered junsu's version as the side effect of the patch makes pids smaller, however, I'd concur the concerns about simplicity of code will be a good reason of the final decision. Cheers, --=20 Xin LI <delphij frontfree net> http://www.delphij.net/ See complete headers for GPG key and other information. --/04w6evG8XlLl3ft Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAeznQOfuToMruuMARAo6zAJ9+5IzDUqjTaiaW67Vow3EDnzRuCgCfZPZ2 CuWQLrFW/dJpVJ4E3nhnLhI= =m6An -----END PGP SIGNATURE----- --/04w6evG8XlLl3ft--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040413005232.GA2959>