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] [day] [month] [year] [list]
Date:	Mon, 16 Feb 2015 12:55:25 -0800
From:	Andy Lutomirski <luto@...capital.net>
To:	Ingo Molnar <mingo@...nel.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>
CC:	linux-kernel@...r.kernel.org,
	Andy Lutomirski <luto@...capital.net>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Thomas Gleixner <tglx@...utronix.de>,
	Arnaldo Carvalho de Melo <acme@...radead.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [GIT PULL] perf x86 updates for v3.20

On 02/15/2015 11:48 PM, Ingo Molnar wrote:
> Linus,
>
> Please pull the latest perf-core-for-linus git tree from:
>
>     git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf-core-for-linus
>
>     # HEAD: a66734297f78707ce39d756b656bfae861d53f62 perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks

[...]

> The extra CR4 manipulation adds ~ <50ns to the context
> switch cost between rdpmc-capable and rdpmc-non-capable
> mms.

That's about the best I could benchmark, too -- if it was more than 
about 50ns, I'm pretty sure I wouldn't seen a difference, but, as it 
stands, it seems to have been lost in the noise.  Maybe I should find a 
better benchmark.

In any event, this series is probably a mixed bag performance-wise.  In 
the best base, there's a small extra cost in context switches, and, when 
switching PCE, there's a CR4 write.  On SVM guests, the CR4 write will suck.

To balance that out, I removed a CR4 read from VMX entry and from global 
TLB flushes.  The former mostly fixes a performance regression from a 
security fix a few releases back, and the I expect that the latter will 
more than offset the added context switch overhead (especially on SVM 
guests, where even CR4 reads exit AFAIK).

Anyway, I tried and failed to detect any difference at all.  Context 
switch timing was very noisy for me.

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