Commit ffb726cd authored by Linus Torvalds's avatar Linus Torvalds

Make pid_max grow dynamically as needed.

parent e06818fb
......@@ -175,6 +175,8 @@ static int get_pid(unsigned long flags)
if (last_pid >= next_safe) {
inside:
if (nr_threads > pid_max >> 4)
pid_max <<= 1;
next_safe = pid_max;
read_lock(&tasklist_lock);
repeat:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment