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) ...@@ -175,6 +175,8 @@ static int get_pid(unsigned long flags)
if (last_pid >= next_safe) { if (last_pid >= next_safe) {
inside: inside:
if (nr_threads > pid_max >> 4)
pid_max <<= 1;
next_safe = pid_max; next_safe = pid_max;
read_lock(&tasklist_lock); read_lock(&tasklist_lock);
repeat: 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