Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp115612imm; Mon, 1 Oct 2018 07:30:48 -0700 (PDT) X-Google-Smtp-Source: ACcGV61ogmFMvoDMRUOID+k2wAIpEK096EcLZ6PXv75RAR2bt/u/sqSMihNH5ZOOMo4VMIi+9DQT X-Received: by 2002:a63:1506:: with SMTP id v6-v6mr10581246pgl.150.1538404248396; Mon, 01 Oct 2018 07:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538404248; cv=none; d=google.com; s=arc-20160816; b=mspNGlG0ivrdzX4ch6mAclzlP8iV/+y0iQ5MQWB3C/kdbP9yuYaqGTlQpxCY+O4gxa jkrxG4IGc63Iy33c/GklyDwYlq90wiPgYYkSFAgRIW5bIb3cG0zi5HJ8CMMqLMXRBwCA cpBCg6MyTs+2WGMA6ZPDrMe1bf9UpuST/e+6hiexUgC5KkUzZRyZKJa6h7oFI+CLekss INkI1igqXiO/IrS4W7anqyDfM2k25sU9Vk8CJKsC9VQBg/LkV8nctS4YkNVbTobD+dsd 2iFJMx0x3VEzZP/JzVreKy+qioDkgLgShF+q5nFQJx4u1lujLD1cWpNDIa/2z4uPtbo9 Wg8Q== 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; bh=oPiDlXJIfsWvtXOKcBedlXyS1AjrCavFkw/YqHwVzMo=; b=ntkKkySj6Spdz0+zHNb7QhBar4NRER5QCBwKEasDT3HnAqce/7n1p+YOd0evNf3IA3 7YfTGnJDuGDZ31l2iHdBjote0TrbVG2FzkqgQRxaoEvx1PzO+F2QW//mTWPEgrt7vLXG xXQYtfq7S/4zP7hTIiqg25l8lJ5mV8K4JBTQCUpjLCMeHO0JDTVRjBDXFjjfW+WDQrAL fyYmbWK07kTzp3nuEOKk/NxiuADpFJQ7zaqucy76xxEpmKBh9mkCN+A3WiO1vfvI4d7S fJ5vHrKGEtKQ1ZlD0RaZYrfWO0dAm1dqGG2rYNm9B/ai8P4w8dC0ADrlRQclR/e2BfU3 uvSA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 207-v6si12174688pgf.245.2018.10.01.07.30.33; Mon, 01 Oct 2018 07:30:48 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729557AbeJAVG4 (ORCPT + 99 others); Mon, 1 Oct 2018 17:06:56 -0400 Received: from foss.arm.com ([217.140.101.70]:50442 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729512AbeJAVG4 (ORCPT ); Mon, 1 Oct 2018 17:06:56 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 8DFCC7A9; Mon, 1 Oct 2018 07:28:51 -0700 (PDT) Received: from edgewater-inn.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 5E1F73F5B3; Mon, 1 Oct 2018 07:28:51 -0700 (PDT) Received: by edgewater-inn.cambridge.arm.com (Postfix, from userid 1000) id 0DD7E1AE3C57; Mon, 1 Oct 2018 15:29:15 +0100 (BST) Date: Mon, 1 Oct 2018 15:29:15 +0100 From: Will Deacon To: "Kulkarni, Ganapatrao" Cc: "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "mark.rutland@arm.com" , "catalin.marinas@arm.com" , "peterz@infradead.org" , "mingo@redhat.com" , "acme@kernel.org" , "Nair, Jayachandran" , "Richter, Robert" , "Lomovtsev, Vadim" , Jan Glauber , "gklkml16@gmail.com" Subject: Re: [PATCH] arm_pmu: Delete incorrect cache event mapping for some armv8_pmuv3 events. Message-ID: <20181001142914.GD9716@arm.com> References: <20181001100707.16840-1-ganapatrao.kulkarni@cavium.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181001100707.16840-1-ganapatrao.kulkarni@cavium.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Ganapat, On Mon, Oct 01, 2018 at 10:07:43AM +0000, Kulkarni, Ganapatrao wrote: > Perf events L1-dcache-load-misses, L1-dcache-store-misses are mapped to > armv8_pmuv3 (both DT and ACPI) event L1D_CACHE_REFILL. This is incorrect, > since L1D_CACHE_REFILL counts both load and store misses. > Similarly the events L1-dcache-loads, L1-dcache-stores, dTLB-load-misses > and dTLB-loads are wrongly mapped. Hence Deleting all these cache events > from armv8_pmuv3 cache mapping. > > Signed-off-by: Ganapatrao Kulkarni > --- > arch/arm64/kernel/perf_event.c | 8 -------- > 1 file changed, 8 deletions(-) The "generic" events are really implemented on a best-effort basis, as they rarely tend to map exactly to what the hardware supports. I think they originally stemmed from the x86 CPU PMU, but that doesn't really help us. I had a discussion with Ingo back when we originally implemented perf because I actually preferred not to implement the generic events at all. However, he was strongly of the opinion that a best-effort approach was sufficient to get casual users going with the tool, so that's what we went with. Will