Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 May 2003 23:40:40 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/ia64/ia64 pmap.c
Message-ID:  <200305160640.h4G6eeus014238@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



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