Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3408238yba; Tue, 16 Apr 2019 10:42:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqx8cVZJ4pTB66Qoty0fuyZFzFKckliRr3H3HWtLlX0OptTwr+c+ny1XJO/J2BCDzEoXDdDn X-Received: by 2002:a62:5144:: with SMTP id f65mr84968116pfb.13.1555436552220; Tue, 16 Apr 2019 10:42:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555436552; cv=none; d=google.com; s=arc-20160816; b=dRMVtoRAwtnBuAwuOAfdGWvBNsKOsZC1bCJ3P3gjlDDcFTvWaRjpAJFa0a80+nWlat OjkEkazo7XLXJkmQvT328as6O8UnGPhqWGLU1QLmxjHM+z4qzzpUn6TCiKND4Odbnwbe TPuDtYCcaQlAW97lW/LyE2rR1/H2a1ydfvkx+VMhJOb3fPVrTd97E8moijNGcEWjAtLD GOQ/ufEiayqFu+tdbBdLFmpfE3oeZt4jKOx7gvnq41vEOUyreyodZsdYaT+12Refoj6U i4FOuG4AcPgmAdcDa9PWAlZorKOARskQtM3oGsVmN+2Y84uz//V63qXjqzCqEHqB6h/R oQwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=uJX5KL/XHJgsYTL67aKBj+gUCXbmMGwl7EtalEEdM+Y=; b=PJBe/CFwHqql5Nip+2P0KR2ajkRnNivBbMWokfL5jr8ujaZFaouwI1lvRZL4eCLXd0 orqz6P4IOD77CNm78E5yoJ3Ieimb5Lz7D9pRp9QpLku86d1MuA0NIfg5MwyXntqtSwEE wsM3UR2m5FBGeZ5KVhnKvetMLJiHG/ANfvp/6QO2cwcS8UswEhKx0w4MVQ2pN+sxPgcg +zks8YPxMbZai7mHOZPMNJg+RUj/OnYYI/+17EqHIf6lfuK4qswgt1r2IzdRvvn3mykz gUWVhRU4gt21XPp1WCaftCU30gAgKGE2tjSvYyPB/8TnPHkK4Llq7jdnoTeCIY5Yab7a w0vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=rfY5Ko44; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e192si45034708pgc.222.2019.04.16.10.42.16; Tue, 16 Apr 2019 10:42:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=rfY5Ko44; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730180AbfDPRlS (ORCPT + 99 others); Tue, 16 Apr 2019 13:41:18 -0400 Received: from merlin.infradead.org ([205.233.59.134]:48534 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728108AbfDPRlS (ORCPT ); Tue, 16 Apr 2019 13:41:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uJX5KL/XHJgsYTL67aKBj+gUCXbmMGwl7EtalEEdM+Y=; b=rfY5Ko44V43CJuRAv9JllGJuu nC4k4PUwnSmLT44LkI35P8nHp1pMqKRbJI3zMCX6XUeo/yHNAMo/VrRRuSzyJFQ9s5VkAZk+ZuedV kxJlo8WPHM3Ay7LEYj7u9eE7kdDmUqrizFu0ylFevn+PkdVOkP7xbJPZvPRuoCpvjRMyqmf89GK6b +xH836D9qCt4cVIa7MZOKMBI1GiSI94vCinczLsGZvpqdGxUbU/aGE8xcAcjDywA27/z34Lh5uHbF qqlEErZirjXHjDSmoTuhndEIfcyykfwb5pzlZgWvzak9WNN3ZlNUlXUCBBMPdRo5tjmPstBA0IVbY 0dblpY5fg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1hGS51-0004kG-Ku; Tue, 16 Apr 2019 17:41:11 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 6A1FA25E4A93C; Tue, 16 Apr 2019 19:41:10 +0200 (CEST) Date: Tue, 16 Apr 2019 19:41:10 +0200 From: Peter Zijlstra To: Vince Weaver Cc: mingo@kernel.org, eranian@google.com, alexander.shishkin@linux.intel.com, acme@redhat.com, hpa@zytor.com, torvalds@linux-foundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, jolsa@redhat.com, linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/core] perf/x86/intel: Force resched when TFA sysctl is modified Message-ID: <20190416174110.GS4038@hirez.programming.kicks-ass.net> References: <20190408173252.37932-3-eranian@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 16, 2019 at 12:28:00PM -0400, Vince Weaver wrote: > On Tue, 16 Apr 2019, tip-bot for Stephane Eranian wrote: > > > Commit-ID: f447e4eb3ad1e60d173ca997fcb2ef2a66f12574 > > Gitweb: https://git.kernel.org/tip/f447e4eb3ad1e60d173ca997fcb2ef2a66f12574 > > Author: Stephane Eranian > > AuthorDate: Mon, 8 Apr 2019 10:32:52 -0700 > > Committer: Ingo Molnar > > CommitDate: Tue, 16 Apr 2019 12:19:35 +0200 > > > > perf/x86/intel: Force resched when TFA sysctl is modified > > What's TFA? Tuna-fish-alarm? Nowhere in the commit or in the code does > it ever say what a TFA is or why we'd want to resched when it is modified. See commit: 400816f60c54 ("perf/x86/intel: Implement support for TSX Force Abort") Author: Peter Zijlstra (Intel) Date: Tue Mar 5 22:23:18 2019 +0100 perf/x86/intel: Implement support for TSX Force Abort Skylake (and later) will receive a microcode update to address a TSX errata. This microcode will, on execution of a TSX instruction (speculative or not) use (clobber) PMC3. This update will also provide a new MSR to change this behaviour along with a CPUID bit to enumerate the presence of this new MSR. When the MSR gets set; the microcode will no longer use PMC3 but will Force Abort every TSX transaction (upon executing COMMIT). When TSX Force Abort (TFA) is allowed (default); the MSR gets set when PMC3 gets scheduled and cleared when, after scheduling, PMC3 is unused. When TFA is not allowed; clear PMC3 from all constraints such that it will not get used. Signed-off-by: Peter Zijlstra (Intel) Signed-off-by: Thomas Gleixner