JKH project..
Xin LI
delphij at frontfree.net
Mon Apr 12 17:52:39 PDT 2004
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:
> >
> > > the fork syscall has to check the new PID against all exixting pids..
> > >
> > > 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
> > > a 'noticable' amount of time.
> >
> > 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?
> >
[...]
>
> Well what you've done seems to fit my definition of "improved"..
>
> 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=43361
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.html
David Schultz's post of his benchmark:
http://lists.freebsd.org/pipermail/freebsd-current/2004-February/020807.html
John's opinion:
http://lists.freebsd.org/pipermail/freebsd-current/2004-February/020957.html
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,
--
Xin LI <delphij frontfree net> http://www.delphij.net/
See complete headers for GPG key and other information.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20040413/5637d4a5/attachment.bin
More information about the freebsd-current
mailing list