Re: [Patch 1/1] init: Provide a kernel start parameter to increasepid_max v2

From: Pavel Machek
Date: Sun Apr 25 2010 - 15:08:13 EST


Hi!

> > Iirc, some _really_ old code used 'short' for pid_t, and we wanted to be
> > really safe when we raised the limits.
>
> .. I dug into the history, and this is from August 2002..
>
> We used to limit it to sixteen bits, but that was too tight even then for
> some people, so first we did this:
>
> Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxx>
> Date: Thu Aug 8 03:57:42 2002 -0700
>
> Make pid allocation use 30 of the 32 bits, instead of 15.
...
> which just upped the limits. That, in turn, _did_ end up breaking some
> silly old binaries, so then a month later Ingo did a "pid-max" patch
> that made the maximum dynamic, with a default of the old 15-bit limit,
> and a sysctl to raise it.
>
> And then a couple of weeks later, Ingo did another patch to fix the
> scalability problems we had with lots of pids (avoiding the whole
> "for_each_task()" crud to figure out which pids were ok, and using a
> 'struct pid' instead).
>
> So the whole worry about > 15-bit pids goes back to 2002. I think we're
> pretty safe now.

>From principle of least surprise PoV: breaking old userspace when you
pass special config option is less surpising than breaking old
userspace when you add more CPUs.

Whether the breakage will be common enough that this matters is other
question.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
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/