Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code
From: Andrea Arcangeli
Date: Wed Jan 10 2018 - 08:12:19 EST
On Wed, Jan 10, 2018 at 02:10:10PM +0100, Andrea Arcangeli wrote:
> It's still incredibly faster to shutdown part of the CPU temporarily
> than to flush its internal state as a whole with IBPB. If it wouldn't
> be the case ibrs_enabled 0 ibpb_enabled 2 special mode would perform
> better (but that's only enabled by default if SPEC_CTRL is not
> available and only IBPB_SUPPORT is).
Yet another bit of perhaps useful info: if you run 100% kernel
intensive computation (i.e. only interrupts on idle task or a kernel
driver doing all in kernel) ibrs_enabled 0 ibpb_enabled 2 of course is
much faster than ibrs_enabled 1 ibpb_enabled 1. As long as you don't
have frequent ring change, ibrs_enabled 0 ibpb_enabled 2 is faster.