cvs commit: src/sys/ia64/ia64 pmap.c
Marcel Moolenaar
marcel at FreeBSD.org
Thu May 15 23:40:41 PDT 2003
marcel 2003/05/15 23:40:40 PDT
FreeBSD src repository
Modified files:
sys/ia64/ia64 pmap.c
Log:
Revamp the RID allocation code:
o Limit the size of the region ID map to 64KB. This gives a bitmap
that is large enough to keep track of 2^19 numbers. The minimal map
size is 32KB. The reason we limit the map size is that processor
models may have implemented a 24-bit region ID, which would give
a 2MB bitmap while the maximum number of allocations is always
less than PID_MAX*5, which is less than 2^19.
o Allocate all region IDs up-front. The slight downside of reserving
more RIDs then a process needs (3 for ia64 native and 1 for ia32)
is preferable over the call to pmap_ensure_rid() where RIDs are
allocated on demand. On SMP systems this may lead to a race
condition.
o When allocating a region ID, don't use arc4random(). We're not
interested in randomness or uniform distribution across the
spectrum. We only need uniqueness. Random numbers may easily
collide when the number of allocated RIDs is high, creating a
possibly unbounded retry rate.
Revision Changes Path
1.98 +60 -42 src/sys/ia64/ia64/pmap.c
More information about the cvs-all
mailing list