Messages in this thread | | | Date | Thu, 22 Apr 2010 12:08:02 -0500 | From | Robin Holt <> | Subject | Re: [Patch 1/1] init: Provide a kernel start parameter to increase pid_max v2 |
| |
> Which I'm not entirely sure makes the case for the kernel parameter much > stronger, though. I wonder if it's not more appropriate to just have a > total hack saying > > if (max_pids < N * max_cpus) { > printk("We have %d CPUs, increasing max_pids to %d\n"); > max_pids = N*max_cpus; > } > > where "N" is just some random fudge-factor. It's reasonable to expect a > certain minimum number of processes per CPU, after all.
How about:
pid_max_min = max(pid_max_min, 19 * num_possible_cpus()); pid_max_baseline = 2048 * num_possible_cpus();
if (pid_max < pid_max_baseline) { printk("We have %d CPUs, increasing pid_max to %d\n"... pid_max = pid_max_baseline; }
This would scale pid_max_min by a sane amount, leave the default value of pid_max_min and pid_max untouched below 16 cpus and then scale both up linearly beyond that.
Robin
| |