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:	Mon, 1 Jul 2013 09:50:46 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Borislav Petkov <bp@...en8.de>
Cc:	Wedson Almeida Filho <wedsonaf@...il.com>,
	Ingo Molnar <mingo@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	linux-kernel@...r.kernel.org,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH] x86: Use asm-goto to implement mutex fast path on x86-64


* Borislav Petkov <bp@...en8.de> wrote:

> On Sat, Jun 29, 2013 at 04:56:30PM -0700, Wedson Almeida Filho wrote:
> > On Fri, Jun 28, 2013 at 7:09 AM, Borislav Petkov <bp@...en8.de> wrote:
> > 
> > > Btw, do we have any perf data showing any improvements from this patch?
> > 
> > I wrote a simple test the measures the time it takes to acquire and
> > release  an uncontended mutex (i.e., we always take the fast path)
> > 100k times. I ran it a few times, the original code averages
> > 2.743436ms, and the new code averages 2.101098ms, so it's about 23% improvement.
> 
> Microbenchmark results tend to be misleading in such situations. Rather, 
> it would be much closer to reality if you traced a real workload like a 
> simple kernel build, for example, with and without your patch.

Not sure - the main thing we want to know is whether it gets faster. The 
_amount_ will depend on things like precise usage patterns, caching, etc. 
- but rarely does a real workload turn a win like this into a loss.

> I.e., something like
> 
> perf stat --repeat 5 ./build-kernel.sh
> 
> and take a look at what the perfcouters are saying in both cases.

Hm, the noise of such a workload will very likely drown out improvements 
that are in the cycle scale.

Thanks,

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