Re: [patch] lockless, scalable get_pid(), for_each_process() elimination, 2.5.35-BK

From: Ingo Molnar (
Date: Wed Sep 18 2002 - 12:36:00 EST

On Wed, 18 Sep 2002, William Lee Irwin III wrote:

> > i agree that this is okay, as an added mechanism. Nevertheless this does
> > not eliminate the 'box locks up for seconds' (or even minutes) situation.
> The lockups I see range from hours to "it spun over the weekend, time to
> pull the plug".

this can happen if there's a genuine PID space squeeze wrt. nr_threads -
that is solved by adding Linus' suggestion to the PID allocator. I believe
you saw that problem, not any inherent get_pid() algorithmic inefficiency.

nevertheless we do lock up for 32 seconds if there are 32K PIDs allocated
in a row and last_pid hits that range - regardless of pid_max. (Depending
on the cache architecture it could take significantly more.)


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Mon Sep 23 2002 - 22:00:23 EST