lkml.org 
[lkml]   [2010]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2010-04-25 19:19    [W:0.736 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site