Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbeADRF1 (ORCPT + 1 other); Thu, 4 Jan 2018 12:05:27 -0500 Received: from www.llwyncelyn.cymru ([82.70.14.225]:46074 "EHLO fuzix.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbeADRFT (ORCPT ); Thu, 4 Jan 2018 12:05:19 -0500 Date: Thu, 4 Jan 2018 17:04:42 +0000 From: Alan Cox To: Andrea Arcangeli Cc: Paolo Bonzini , Andrew Cooper , "Woodhouse, David" , "pavel@ucw.cz" , "tim.c.chen@linux.intel.com" , "linux-kernel@vger.kernel.org" , "torvalds@linux-foundation.org" , "tglx@linutronix.de" , "andi@firstfloor.org" , "dave.hansen@intel.com" , "gregkh@linux-foundation.org" Subject: Re: Avoid speculative indirect calls in kernel Message-ID: <20180104170442.710aa4c4@alans-desktop> In-Reply-To: <20180104162541.GD13348@redhat.com> References: <20180103230934.15788-1-andi@firstfloor.org> <20180104114231.GB1702@amd> <1515066469.12987.112.camel@amazon.co.uk> <94b12025-b27c-04d2-8726-c07a3af6b265@redhat.com> <7a3584c6-0c00-d807-5130-13d1f4b34102@citrix.com> <20180104162541.GD13348@redhat.com> Organization: Intel Corporation X-Mailer: Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: > If you run lots of syscalls ibrs 1 ibpb 1 is much faster. If you do > infrequent syscalls computing a lot in kernel like I/O with large > buffers getting copied, ibrs 0 ibpb 2 is much faster than ibrs 1 ibpb > 1 (on those microcodes where ibrs 1 reduces performance a lot, not all > microcodes implementing SPEC_CTRL are inefficient like that). Have you looked at whether you can measure activity and switch automatically between the two (or by task). It seems silly to leave something the machine can accurately assess toa human ? Alan