Messages in this thread | | | Date | Sun, 25 Apr 2010 10:15:07 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [Patch 1/1] init: Provide a kernel start parameter to increase pid_max v2 |
| |
On Sun, 25 Apr 2010, Pavel Machek wrote: > > Issue with max_pids is that it can break userspace, right?
Iirc, some _really_ old code used 'short' for pid_t, and we wanted to be really safe when we raised the limits.
I seriously doubt we need to worry about old binaries like that on any 16+ CPU machines, though.
The other issue is just the size of the pidmap[] array. Instead of walking all the processes to see "is this pid in use" (like I think the original Linux kernel did), we have a bitmap of used pids. When you raise pid_max, that bitmap obviously still needs to be big enough. Right now we allocate that statically (rather than growing it dynamically), so we end up having a _hard_ limit of PID_MAX_LIMIT too.
On 32-bit, I think that still maximum limit ends up being basically 32767. So again, on a _legacy_ system, you end up being limited in the number of pid_t entries.
Linus
| |