From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D9CFC43441 for ; Wed, 21 Nov 2018 20:33:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 708D820821 for ; Wed, 21 Nov 2018 20:33:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 708D820821 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728654AbeKVHJl (ORCPT ); Thu, 22 Nov 2018 02:09:41 -0500 Received: from mga03.intel.com ([134.134.136.65]:35635 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726200AbeKVHJl (ORCPT ); Thu, 22 Nov 2018 02:09:41 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Nov 2018 12:33:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,262,1539673200"; d="scan'208";a="108251962" Received: from skl-02.jf.intel.com ([10.54.74.62]) by fmsmga004.fm.intel.com with ESMTP; 21 Nov 2018 12:33:48 -0800 From: Tim Chen To: Jiri Kosina , Thomas Gleixner Cc: Tim Chen , Linus Torvalds , Tom Lendacky , Ingo Molnar , Peter Zijlstra , Josh Poimboeuf , Andrea Arcangeli , David Woodhouse , Andi Kleen , Dave Hansen , Casey Schaufler , Asit Mallick , Arjan van de Ven , Jon Masters , Waiman Long , Greg KH , Dave Stewart , linux-kernel@vger.kernel.org, x86@kernel.org, stable@vger.kernel.org Subject: [PATCH] x86/speculation: Revert turning on STIBP all the time Date: Wed, 21 Nov 2018 12:00:49 -0800 Message-Id: <0693f05ac4b041ee2f988dfec31ebc81f4f28f17.1542830344.git.tim.c.chen@linux.intel.com> X-Mailer: git-send-email 2.9.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 53c613fe "x86/speculation: Enable cross-hyperthread spectre v2 STIBP mitigation" turns on STIBP all the time. This causes large performance regression in many workloads. One case is perlbench in the SpecInt Rate 2006 test suite which shows a 21% reduction in throughput. There're also other reports of drop in performance on Python and PHP benchmarks: https://www.phoronix.com/scan.php?page=article&item=linux-420-bisect&num=2 STIBP on all the time should not be the default option. Turn off STIBP all the time for now till STIBP can be applied on a per task basis. Signed-off-by: Tim Chen --- arch/x86/kernel/cpu/bugs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index c37e66e..21a8f39 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c @@ -332,7 +332,7 @@ static bool stibp_needed(void) if (!boot_cpu_has(X86_FEATURE_STIBP)) return false; - return true; + return false; } static void update_stibp_msr(void *info) -- 2.9.4