Re: [Linux] Linux PID algorithm is BRAINDEAD!

From: Dave Goel
Date: Sat Oct 10 2015 - 23:52:32 EST


Hi Ted,

Thanks for responding. Fair points all of them.

I would like to take exception to one of them, the bottleneck part:

> The biggest problem is that accessing this free pid queue is now
> a locking bottleneck --- especially on a very large NUMA system

That was exactly what I was trying to say towards the end: the the
queue idea or implementation need not be strict. No one cares if
instead of grabbing the very firts aof
the queue, you grab, say, the third element. The /only/ real
requirement is that newly entered elements not go near the head of the
queue.

I would argue that bottleneck or resource locking doesn't exist at all:

If you have n cpu's, you can have n queues, albeit each now smaller.
(Or, equivalently, the cpu's deciding to divvy up the queue into a mod
n space.). And, the populator pushing into them in a round-robin
fashion.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/