Re: pidmap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2007-04-08 at 04:10 +0200, ninjaboy wrote:
> hi,
> How works the alloc_pidmap() ? and what is the precise use of page?
> 

from http://lwn.net/Articles/9632/

Ingo handles PID allocation through a new allocator that he wrote from
scratch. This allocator maintains an array of pages (allocated as
needed) which are used as PID bitmaps; allocating a new PID becomes a
matter of finding a page with a free PID available, then finding and
clearing the first set bit. It all happens with no locking required.
Ingo claims:

Ie. even in the most hopeless situation, if there are 999,999 PIDs
allocated already, it takes less than 10 usecs to find and allocate the
remaining one PID. The common fastpath is a couple of instructions only.





--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux