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

Andries Brouwer (aebr@win.tue.nl)
Wed, 18 Sep 2002 23:15:47 +0200


On Wed, Sep 18, 2002 at 01:29:14PM -0700, William Lee Irwin III wrote:

> I've seen no change in behavior with large PID_MAX.

Of course not. But people keep blaming the wrong routine.
I have said it a thousand times - nothing is wrong with get_pid().

Now proc_pid_readdir() takes a million times as long, so it would
be much more reasonable if people talked about it instead.
With 20000 processes it will visit 10^7 process structs
for one ps.

> It doesn't sound like you read the patch at all.

I looked at it and searched for base.c but didnt find it,
so concluded that the real problem was not addressed.

> > In procfs we have a very quadratic algorithm in proc_pid_readdir()/
> > get_pid_list(). Not a potential hiccup after 2^30 processes that some
> > may want to smoothe, but every single "ls /proc" or "ps".
> > What shall we do with /proc for all these people with 10^5 processes?
> > Andries
>
> That is actually one of the easiest ways to take out one of my machines
> while it's running 10K or so tasks, mentioned a bit ago in this thread.

OK. So we now agree.

But it looks like your patch doesnt change this? Or did I overlook sth?

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/