Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754006AbeAJNMO (ORCPT + 1 other); Wed, 10 Jan 2018 08:12:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59538 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932630AbeAJNML (ORCPT ); Wed, 10 Jan 2018 08:12:11 -0500 Date: Wed, 10 Jan 2018 14:12:07 +0100 From: Andrea Arcangeli To: David Woodhouse Cc: Jiri Kosina , Peter Zijlstra , Dave Hansen , Thomas Gleixner , LKML , Linus Torvalds , x86@kernel.org, Borislav Petkov , Tim Chen , Andi Kleen , Greg KH , Andy Lutomirski , Arjan Van De Ven Subject: Re: [patch RFC 5/5] x86/speculation: Add basic speculation control code Message-ID: <20180110131207.GL9706@redhat.com> References: <20180110120158.GB9706@redhat.com> <1515586174.22302.126.camel@infradead.org> <20180110121755.GD9706@redhat.com> <1515587384.22302.132.camel@infradead.org> <20180110124119.GG9706@redhat.com> <1515588673.22302.139.camel@infradead.org> <20180110130202.GI9706@redhat.com> <20180110130551.GJ9706@redhat.com> <20180110131010.GK9706@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180110131010.GK9706@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 10 Jan 2018 13:12:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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.