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]
Message-ID: <1452277557.19330.64.camel@hpe.com>
Date:	Fri, 08 Jan 2016 11:25:57 -0700
From:	Toshi Kani <toshi.kani@....com>
To:	Chris Wilson <chris@...is-wilson.co.uk>, x86@...nel.org
Cc:	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...e.de>,
	"Luis R. Rodriguez" <mcgrof@...e.com>,
	Stephen Rothwell <sfr@...b.auug.org.au>,
	Ross Zwisler <ross.zwisler@...ux.intel.com>,
	Sai Praneeth <sai.praneeth.prakhya@...el.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] x86: Micro-optimise clflush_cache_range()

On Fri, 2016-01-08 at 09:55 +0000, Chris Wilson wrote:
> Whilst inspecting the asm for clflush_cache_range() and some perf
> profiles
> that required extensive flushing of single cachelines (from part of the
> intel-gpu-tools GPU benchmarks), we noticed that gcc was reloading
> boot_cpu_data.x86_clflush_size on every iteration of the loop. We can
> manually hoist that read which perf regarded as taking ~25% of the
> function time for a single cacheline flush.
> 
> Signed-off-by: Chris Wilson <chris@...is-wilson.co.uk>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: "H. Peter Anvin" <hpa@...or.com>
> Cc: x86@...nel.org
> Cc: Toshi Kani <toshi.kani@....com>
> Cc: Borislav Petkov <bp@...e.de>
> Cc: "Luis R. Rodriguez" <mcgrof@...e.com>
> Cc: Stephen Rothwell <sfr@...b.auug.org.au>
> Cc: Ross Zwisler <ross.zwisler@...ux.intel.com>
> Cc: Sai Praneeth <sai.praneeth.prakhya@...el.com>
> Cc: linux-kernel@...r.kernel.org
> Acked-by: "H. Peter Anvin" <hpa@...or.com>

Thanks for the improvement!  The change looks good to me.

Reviewed-by: Toshi Kani <toshi.kani@....com>

-Toshi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ