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, 24 May 2012 21:05:36 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Alex Shi <alex.shi@...el.com>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc:	Jan Beulich <JBeulich@...e.com>, borislav.petkov@....com,
	arnd@...db.de, akinobu.mita@...il.com, eric.dumazet@...il.com,
	fweisbec@...il.com, rostedt@...dmis.org, hughd@...gle.com,
	jeremy@...p.org, len.brown@...el.com, tony.luck@...el.com,
	yongjie.ren@...el.com, kamezawa.hiroyu@...fujitsu.com,
	seto.hidetoshi@...fujitsu.com, penberg@...nel.org,
	yinghai@...nel.org, tglx@...utronix.de, akpm@...ux-foundation.org,
	ak@...ux.intel.com, luto@....edu, avi@...hat.com,
	dhowells@...hat.com, mingo@...hat.com, riel@...hat.com,
	cpw@....com, steiner@....com, linux-kernel@...r.kernel.org,
	viro@...iv.linux.org.uk, hpa@...or.com
Subject: Re: [PATCH v7 8/8] x86/tlb: just do tlb flush on one of siblings of SMT

On Thu, 24 May 2012 16:48:37 +0800, Alex Shi <alex.shi@...el.com> wrote:
> On 05/24/2012 04:42 PM, Peter Zijlstra wrote:
> 
> > On Thu, 2012-05-24 at 16:32 +0800, Alex Shi wrote:
> >> So, I use cpumask_t in stack.
> > 
> > cpumask_t is 512 bytes with NR_CPUS=4096, that's generally considered
> > too big to be on stack.
> > 
> > A number of people spend a lot of time removing cpumask_t from stacks a
> > while ago, I'm very sure they'll not be happy if you're going to add it
> > back.
> 
> 
> In my testing, allocate a cpumask_var_t is more worse than cpumask_t.
> So, another choice is using percpu pre-allocatd cpumask for this, but I
> am wondering if it is acceptable. What's suggestion for this point?

Thanks for the ping Peter!

Please don't use cpus_ operations: they're deprecated.  Use cpumask_.
Similarly, avoid cpumask_t.

And yes, if you configure for thousands of CPUs, it's not free!  If it's
a significant, you will want to use a per-cpu cpumask_var_t.

My other thought: your patch seems optimal as far as avoiding IPIs goes,
but I wonder how often it folds down to a single CPU?  That case is
easier to fast-path without using a new cpumask.

Cheers,
Rusty.
--
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