From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751532AbeAEL0e (ORCPT + 1 other); Fri, 5 Jan 2018 06:26:34 -0500 Received: from mail-lf0-f52.google.com ([209.85.215.52]:34864 "EHLO mail-lf0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751008AbeAEL0c (ORCPT ); Fri, 5 Jan 2018 06:26:32 -0500 X-Google-Smtp-Source: ACJfBou4DlbyOXFj9lW+yjd9BEicxp7dBUWNyWuZvs+oaYBmxK9yq7onaCEBIkzVMuqnPEuTaFxrgg== Subject: Re: [PATCH v3 01/13] x86/retpoline: Add initial retpoline support To: Paul Turner , David Woodhouse Cc: Alexei Starovoitov , Linus Torvalds , Andi Kleen , LKML , Greg Kroah-Hartman , Tim Chen , Dave Hansen , Thomas Gleixner , Kees Cook , Rik van Riel , Peter Zijlstra , Andy Lutomirski , Jiri Kosina , One Thousand Gnomes References: <1515058213.12987.89.camel@amazon.co.uk> <20180104143710.8961-1-dwmw@amazon.co.uk> <20180104181744.komdplek7nfdvlsw@ast-mbp> <20180104183559.wlqoxmp7rf4d44ku@ast-mbp> <1515094078.29312.17.camel@infradead.org> <20180105102824.GA247671@google.com> From: Paolo Bonzini Message-ID: Date: Fri, 5 Jan 2018 12:26:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180105102824.GA247671@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 05/01/2018 11:28, Paul Turner wrote: > > The "pause; jmp" sequence proved minutely faster than "lfence;jmp" which is why > it was chosen. > > "pause; jmp" 33.231 cycles/call 9.517 ns/call > "lfence; jmp" 33.354 cycles/call 9.552 ns/call Do you have timings for a non-retpolined indirect branch with the predictor suppressed via IBRS=1? So at least we can compute the break even point. Paolo