Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Mar 2007 10:45:05 +0100
From:      Divacky Roman <xdivac02@stud.fit.vutbr.cz>
To:        LI Xin <delphij@delphij.net>
Cc:        MingyanGuo <guomingyan@gmail.com>, freebsd-arch@freebsd.org
Subject:   Re: locking reasoning within fork1()
Message-ID:  <20070313094505.GA40816@stud.fit.vutbr.cz>
In-Reply-To: <45F2C2CB.5000204@delphij.net>
References:  <45F2C2CB.5000204@delphij.net>

next in thread | previous in thread | raw e-mail | index | archive | help
>  - The PID allocation is somewhat expensive when there are a lot of
> processes.  This might not be a very big deal, though, but given that it
> requires to hold a sx_xlock, our scalability could be limited due to
> this.  tjr@ has a proposed hash based PID allocation patch in his p4
> branch, and NetBSD have an O(1) algorithm that may worth to have a look at.

beside that.. what is RFHIGHPID good for? Its supposed to allocate pid > 10
which comment says its used during boot. But it only seems to be used for some
kthreads (not all). No other BSD seems to use this... can we safely remove that?

also.. would __predict_true/__predict_false usage help anything? netbsd seems to
use it in their fork1() routine. especially the pid allocation could benefit from this..

comments?

roman



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070313094505.GA40816>