Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp50391imm; Thu, 2 Aug 2018 13:45:09 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe0JhDbsUyI2Q614ZpNB4uV+VRu1ghwVycOL0zkamsjVelupSofhZC/EoO2oXE1D0JJDoQu X-Received: by 2002:a62:90d4:: with SMTP id q81-v6mr1094153pfk.37.1533242709167; Thu, 02 Aug 2018 13:45:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533242709; cv=none; d=google.com; s=arc-20160816; b=W5ifO2EA5+yZZ/IEDPUdB5/wkXUPtz2Hs9O3q6OdTsWYWiE57fr83AC8vS4E3KtBID yFB9bkWhZxYRt0KSHshdeBCFGzaX9Qg4rkHgO8d/E6bm1AalzO9JWfZF48Pw3Belowmb sHLrey/sqj7XNdq0Jn1Bo8tc6t9OLqobgQB9ggOazNNLTRGPMJsTevJwdPOW2/Rx37q5 Vg9QDhrW9OgiycCXinw53cfxYVKZN6BTzGxqVf5J+dp1s/YCrjRKU59mSxgtPgIjd2Fw 0fQL79E7aF6hOsc6c9ACdGWr8K3zhCwYm7Eghfp6sth5Jl227p74ekwHjflZm4bPxdXP HBXg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=yftN4UF6f6uT8CfJExkBOyQYlgCqmDKJWct3PwrWP78=; b=VCjxUsTgKIo5Oj7jKoIJQNF1q0TtlcKHL15K1vmGA/75ETXXnuQl2tJpFFnJOE/zJt YvpGFL/tal1heAuoaX3N67/Np0LyMGlwYQkmLAToF0YVzHgXG0wlOVQGln/bQLbSEUnc +kWYY7ZCwNX1BaemP2KdmxGbMEqtvyi+XM3p19uACj+RwB4V5WZ5Opk3ROX45VUBFcqQ 3sLlko7rp2LVrNRVovXfk6E/Pww3VRmQtpjWtDXz9paE4K11sMaGsg6HYKq9NS1f7ghB U8TQlgvO/KFJ8eBPTBLeGXK2OZvJfZ18UmxjxBwC6o+sNtnTYYJijv3ojifQ3pi8Txja u/6w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m30-v6si2493460pgc.361.2018.08.02.13.44.54; Thu, 02 Aug 2018 13:45:09 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732094AbeHBWga (ORCPT + 99 others); Thu, 2 Aug 2018 18:36:30 -0400 Received: from mga03.intel.com ([134.134.136.65]:9154 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726662AbeHBWg3 (ORCPT ); Thu, 2 Aug 2018 18:36:29 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 Aug 2018 13:43:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,436,1526367600"; d="scan'208";a="245525126" Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.241.229.198]) ([10.241.229.198]) by orsmga005.jf.intel.com with ESMTP; 02 Aug 2018 13:43:42 -0700 Subject: Re: [PATCH 0/2] x86/intel_rdt and perf/x86: Fix lack of coordination with perf To: Peter Zijlstra , Dave Hansen Cc: tglx@linutronix.de, mingo@redhat.com, fenghua.yu@intel.com, tony.luck@intel.com, vikas.shivappa@linux.intel.com, gavin.hindman@intel.com, jithu.joseph@intel.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org References: <20180802123923.GJ2530@hirez.programming.kicks-ass.net> <1af731f8-b5d3-5aca-af02-575802a961b9@intel.com> <20180802161823.GJ2458@hirez.programming.kicks-ass.net> <20180802173727.GP2494@hirez.programming.kicks-ass.net> <653e874f-5e77-a9b5-996a-ed9daa3c6d43@intel.com> <20180802195410.GR2494@hirez.programming.kicks-ass.net> <20180802201312.GS2494@hirez.programming.kicks-ass.net> From: Reinette Chatre Message-ID: <086b93f5-da5b-b5e5-148a-cef25117b963@intel.com> Date: Thu, 2 Aug 2018 13:43:42 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <20180802201312.GS2494@hirez.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 8/2/2018 1:13 PM, Peter Zijlstra wrote: > On Thu, Aug 02, 2018 at 01:06:19PM -0700, Dave Hansen wrote: >> On 08/02/2018 12:54 PM, Peter Zijlstra wrote: >>>> I totally understand not wanting to fill the tree with code hijacking >>>> the raw PMU. Is your reaction to this really around not wanting to >>>> start down the slippery slope that ends up with lots of raw PMU "owners"? >>> That and the fact that multiple owner directly contradicts what perf set >>> out to do, provide resource arbitration for the PMU. >>> >>> Not being able to use both perf and this resctl thing at the same time >>> is utter crap. You will not get special dispensation. The goal of this work is to use the existing PMU hardware coordination mechanism to ensure that perf and resctrl will not interfere with each other. The resctrl debugging is short-lived - it reserves the PMU hardware while interrupts are disabled and releases the PMU hardware before re-enabling interrupts. If a perf session is running at that time then this reservation will ensure it is not interfered with. If a perf session is not running at the time then it will not even get the opportunity to attempt to start one. >> Is there something we could do in the middle, like have perf itself be >> in charge of doing all the programming, but the psuedo-locking could >> still _read_ the counters? > > perf has all of that. At the time the counters are read the damage has already been done by all the extra instructions and data accessed during the enable and disable of the events. Reinette