lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 22 Apr 2010 14:10:57 -0400
From:	"John Stoffel" <john@...ffel.org>
To:	Robin Holt <holt@....com>
Cc:	Linus Torvalds <torvalds@...ux-foundation.org>,
	Alan Cox <alan@...rguk.ukuu.org.uk>, Greg KH <gregkh@...e.de>,
	Rik van Riel <riel@...hat.com>,
	John Stoffel <john@...ffel.org>, Hedi Berriche <hedi@....com>,
	Mike Travis <travis@....com>, Ingo Molnar <mingo@...e.hu>,
	Jack Steiner <steiner@....com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [Patch 1/1] init: Provide a kernel start parameter to increase
 pid_max v2

>>>>> "Robin" == Robin Holt <holt@....com> writes:

>> 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.

Robin> How about:

Robin> 	pid_max_min = max(pid_max_min, 19 * num_possible_cpus());
Robin> 	pid_max_baseline = 2048 * num_possible_cpus();

Robin> 	if (pid_max < pid_max_baseline) {
Robin> 		printk("We have %d CPUs, increasing pid_max to %d\n"...
Robin> 		pid_max = pid_max_baseline;
Robin> 	}


Robin> This would scale pid_max_min by a sane amount, leave the default value
Robin> of pid_max_min and pid_max untouched below 16 cpus and then scale both
Robin> up linearly beyond that.

Looks good, but how about some comments and some defines for the magic
numbers of 2048 and 19?  

John

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ