Subject: Re: new pid allocation - any advantages?
To: Jaromir Dolecek <jdolecek@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 03/21/2003 09:00:38
> I'm looking at this code (trying to figure how to adjust stuff to honour
> hard limit PID_MAX for pid) and actually wonder if this is very useful
> at all.

pids greater than PID_MAX are only allocated if there are over (about) 16384
ids already allocated [1].  Since each active process can require 3 ids (it
can have unique pid, pgid and sid) you would need to error the proc_alloc()
call instead of allocating a larger pid.

> The code is quite big, uses some amount of memory on runtime and
> the performance isn't really different to the previous pid allocator.

The memory used at runtine is FAR less than the old code.
The performance change it mainly to pfind() and pgfind() which are
called quite often, and are now table lookups, not searches.

> I wonder if it was actually tested with bigger number of processes/LWPs at
> all, too.

The old code has a compile time dependency on MAXUSERS, this sucks.

	David

-- 
David Laight: david@l8s.co.uk