Subject: Re: new pid allocation code
To: Brian Chase <firstname.lastname@example.org>
From: David Laight <email@example.com>
Date: 03/18/2003 09:24:29
> > I haven't seen any serious objections, I've even changed deadprocs to
> > an SLIST.
> What's the worst case scenario for the size of the list(s) in memory?
If you mean the 'deadprocs' list, it depends on whether the reaper
ever blocks (or on a MP system how fast the other cpus are creating
dead processes). All I've done is change that list from FIFO to LIFO,
in practise I don't suppose it often has more than one member. It is
I removed the lists assoctiated with the pidhash and pgrphash, either
or which could, in the worst case, have been a single list containing
all the processes (pgrps).
The freelist I use for pids consumes no additional memory and is never
The memory cost of the code is 2 pointers per entry in the pid_table
- whose size depends on the maximum number of concurrent processes.
(the size will increase automatically, but never decrease).
2 pointers have beed removed from struct pgrp, and 1 from struct proc.
David Laight: firstname.lastname@example.org