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:	Fri, 12 Sep 2008 15:50:49 -0700
From:	Mike Travis <travis@....com>
To:	Rusty Russell <rusty@...tcorp.com.au>
CC:	Ingo Molnar <mingo@...e.hu>, Peter Zijlstra <peterz@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	davej@...emonkey.org.uk, David Miller <davem@...emloft.net>,
	Eric Dumazet <dada1@...mosbay.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Jack Steiner <steiner@....com>,
	Jeremy Fitzhardinge <jeremy@...p.org>,
	Jes Sorensen <jes@....com>, "H. Peter Anvin" <hpa@...or.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	linux-kernel@...r.kernel.org,
	Christoph Lameter <cl@...ux-foundation.org>,
	Andi Kleen <andi@...stfloor.org>
Subject: Re: [RFC] CPUMASK: proposal for replacing cpumask_t

Rusty Russell wrote:
> On Saturday 13 September 2008 00:28:56 Mike Travis wrote:
>> Rusty Russell wrote:
>>> I'm yet to be convinced that we really need to allocate cpumasks in any
>>> fast paths.  And if not, we should simply allocate them everywhere.  I'd
>>> rather see one #ifdef around a place where we can show a perf issue.
>> Using a typedef came from Linus, and the idea is basically if NR_CPUS fits
>> into a long, then it's carried as an array of one (ie., local variable).
> 
> Sure it's clever.  ie. nice and confusing.
> 
> But do we have any code paths where we care?  Unless we do, let's just keep it 
> simple...
> 
> Cheers,
> Rusty.

Here's the thread:

	http://marc.info/?l=linux-kernel&m=121976977901223&w=4

It doesn't seem worthwhile to force all systems to deal with large cpumask's
if they don't need to.  Passing the value on the stack (actually usually in a
reg) if it fits into a long makes a lot of sense.

And I don't think it's that abstract, but I'm willing to hear other opinions.

Btw, most likely only distros that distribute an "Enterprise" edition of
Linux will ever set NR_CPUS so high, so the actual number of systems making
use of this will be a very small percentage (big $$-wise though... ;-) 

I even think that perhaps BITS_PER_LONG might be too low a threshold to kick
in this extra code.  A Larabee chip will have 128 cpus so maybe 128 or 256 is
a better metric...?

As soon as I get a working kernel with the proposed changes, I will definitely
be doing perf testing.

Thanks,
Mike
--
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