Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2385080imm; Thu, 2 Aug 2018 10:39:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeOsLwkHY+ioRgzNqhqugaN0dNSREuf2ItMpxvebIsQf3OuT2qu/lfH65JpSmbe4Q3c4dzb X-Received: by 2002:a65:4cc5:: with SMTP id n5-v6mr366876pgt.451.1533231570777; Thu, 02 Aug 2018 10:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533231570; cv=none; d=google.com; s=arc-20160816; b=WDck/6dWcC8jkKiXseDoGA2mH9mKTniMctINIVxzEB3CKPFB5EgEYuh7/yHsYw9Opj 4U4+zImpu4Ei0xCBiK0hIPdUdIi9S0Gf6XuU1xHrRrW+RJtixm4QLkSFfUYxOyhKwpJt d4ny9QLS7JpCe9T5lhCSEI5GIgWFBLXhokN2LTXA7lXXrNMfLZEQsEK/El/PyzVjblYc ZciTxb1UIvYkpUoHdL6PasR6qLiw82vPjakifl8aHyqpr1xj6pfGDN8LobDd1NU7oqp/ AwLgSxP7XQtnmxSmDDHQJs/7rKUKyVn8kcMZVttUmjUk32fhLD8DB4W8OLy28GERY2jt TNOw== 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:arc-authentication-results; bh=oJiz/8aARGFPY1OEeaUkxNLa5LQ0uhPtU2ayiEipenI=; b=rFfFKCB+5GIKWnGGVcQFOvY8roynJocpV5SsikAE58hRkqu5/EG6TxyUyKfc6KJnnI Bzm/0ytuvFPEi4M/K+kFOI+V+EBN/64Kh39g+SkLms/b6Mc9YB0k9alQwqBtNV50QOVZ 720DoykCKXXSBAGJFBlt8CgqlzStXAZow3SsqBBCamoao5Jzr94nBU0L4+k0+ptfHanw l5gIzbl5nbyqiG1ISdMuNrABkw4S7iwMYGEUGGVEebxOl6ZhXQA8z/Qx2ZDGu4bKwOVO jgVVihgn+YezcH1SoMcGYQKOgArAVjEKUTR2FbTjnDz2X2JjBrDLn2otLwNLdwzS6/VP n9+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=BmjqvUHD; 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 w15-v6si2419513pga.30.2018.08.02.10.39.14; Thu, 02 Aug 2018 10:39:30 -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=bombadil.20170209 header.b=BmjqvUHD; 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 S2387512AbeHBT3m (ORCPT + 99 others); Thu, 2 Aug 2018 15:29:42 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:52020 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387423AbeHBT3m (ORCPT ); Thu, 2 Aug 2018 15:29:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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=oJiz/8aARGFPY1OEeaUkxNLa5LQ0uhPtU2ayiEipenI=; b=BmjqvUHDHC2Mir8Okh8kC9m8j 2v8ri5tiNJuTbJXJaqqL4MwL/qkhdbw0xA4DWWIV1jTtV2+IXO/4YhPq+qmFurDt0e/dY9dx3AKxG nQJic63ffK/Tm0OjHoqdihGUF8kT+rNTBGISRLmJcRQY6YSRAJosR+T/ZhGe7qCQGpDlzh9nYPhc5 Hw5lsHvWmM9dH1wyNOGrbYVAlMtDjhS2Z5tBYAXZ69wal2uld1qw94Yq/a59OL6H0lYVh0vE1Zyjj QLgWep+OGee2XCDHWIpuzzTcatnHlLQ3BC5c95Or49825jvUKGjVZtfQO3nxvO+WD4JYJrqWf4B1F 009HEOiXw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1flHXV-0004t1-Vb; Thu, 02 Aug 2018 17:37:30 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A6A7B20267E4D; Thu, 2 Aug 2018 19:37:27 +0200 (CEST) Date: Thu, 2 Aug 2018 19:37:27 +0200 From: Peter Zijlstra To: Reinette Chatre 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, dave.hansen@intel.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] x86/intel_rdt and perf/x86: Fix lack of coordination with perf Message-ID: <20180802173727.GP2494@hirez.programming.kicks-ass.net> References: <20180802123923.GJ2530@hirez.programming.kicks-ass.net> <1af731f8-b5d3-5aca-af02-575802a961b9@intel.com> <20180802161823.GJ2458@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 02, 2018 at 09:44:13AM -0700, Reinette Chatre wrote: > On 8/2/2018 9:18 AM, Peter Zijlstra wrote: > > On Thu, Aug 02, 2018 at 09:14:10AM -0700, Reinette Chatre wrote: > > > >> The current implementation does not coordinate with perf and this is > >> what I am trying to fix in this series. > >> > >> I do respect your NAK but it is not clear to me how to proceed after > >> obtaining it. Could you please elaborate on what you would prefer as a > >> solution to ensure accurate measurement of cache-locked data that is > >> better integrated? > > > > We have an in-kernel interface to perf, use that if you want access to > > the PMU. You will not directly stomp on PMU registers. > > I do not see how I can do so without incurring the cache hits and misses > from the data needed and instructions run by this interface. Could you > please share how I can do so and still obtain the accurate measurement > of cache residency of a specific memory region? That's the best you're going to get. You do _NOT_ get to use raw PMU.