Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp270935imm; Mon, 1 Oct 2018 09:39:34 -0700 (PDT) X-Google-Smtp-Source: ACcGV62I6gTBFEiHGAYYvuZ0KBJa/874AOVV4FUgoES7XH/dMxa12Ykb3qlG+aXNnWQs0U8YdZ5v X-Received: by 2002:a62:1551:: with SMTP id 78-v6mr12187977pfv.178.1538411974597; Mon, 01 Oct 2018 09:39:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538411974; cv=none; d=google.com; s=arc-20160816; b=B7C0PYFYpG1z6btxwC+4TsI0OugfjP4jS5CiGiBrVKo0/jE3QButq170Pzw2DEYgW1 mVQYjfbIxLVX6y6biBsLPvF4PFzDB3vnGu40WHt7c2vT4gWjIMhFRJxXVwcH7iguL7rz xpKA2Q0yCidGP5Q9PfGQ4ilNRK0hNIC23RVTY9hz9Vg3OVj5S4fCqhNFrDhJ49B1qis2 qNMdjPwHexVI0Fbi2ZRLUMbf1f+7qreQAPWnTQANoZ3Yr8QJ+pPW/3/d8dvsoErd4nmG e2c4Drwz1pkQ7OMqeDNO3zsgWNqaCkvAPowhRNNDJChHzp9TEefAkvFqYI9rXn8AohEG 5BWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=4KhTcfpLGn0eMyXPsK757drELarbtFUbS9NqFGBVYh8=; b=M5C7JOAPACozcuWkgkgVnfoDw465wHB75s/wlGlyFr+B3HMTpsUtFsTzPmPb8yypsl QkbzoTNwPvMXA23LaP2aJHBpnzWplDawJvsIpFYPoZl8/fsgBe5tG8hha+am5T8vVWkP 6Oc4B1G4Ckezs0rGR0To41lrR4pxfFk3NxY2hd7g5gPCR9k968Q+PgAHwhJ3OqrICFTD 3YlKjMFVWwQOa8k76X0fpMeNylt2Ke7jhpdNJYgfkVcXH8MnR997i/5soigpC/TkAm29 SreR2AEygYjLF7XEoOED7zMBL8+SUtAyoCS9IDwYU5UjU/6rrH7merStaKQj2mOKALZv bxFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="k/n9KFQJ"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m7-v6si222323pfi.286.2018.10.01.09.39.19; Mon, 01 Oct 2018 09:39:34 -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=pass header.i=@gmail.com header.s=20161025 header.b="k/n9KFQJ"; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726143AbeJAXRw (ORCPT + 99 others); Mon, 1 Oct 2018 19:17:52 -0400 Received: from mail-oi1-f195.google.com ([209.85.167.195]:34425 "EHLO mail-oi1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725735AbeJAXRv (ORCPT ); Mon, 1 Oct 2018 19:17:51 -0400 Received: by mail-oi1-f195.google.com with SMTP id v69-v6so4405534oif.1 for ; Mon, 01 Oct 2018 09:39:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4KhTcfpLGn0eMyXPsK757drELarbtFUbS9NqFGBVYh8=; b=k/n9KFQJWGQ4kdAoZiADr1x7a9yGw2DVWzfNX2DZdlK+dQ78x90wdFtmvC+uLbCFhx GaSNjoKJHBBK7OKixNdvc0HRGGYN5HOgKL0R80Pp0MEFU0Um6FhSs8XgrcMZlLqo1EOC b2ugWJXeTqB2Zde97ApBRbHst7vsltNVUEjJuuE0QFGb1hantl+Iv6khKKVxy1UVyXri XISluzQXDNLFp5pca0rRxL4rPeWU7hvE99WZSb6YlgQUQtROy08pog3N39xHPlo9WfXh KDhuh3hINi35uMg9MJbdz2L/e0Kygm4edgD9pzh4Sxk/VyH3URym1zw/9Oqt76w077Sf pXqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4KhTcfpLGn0eMyXPsK757drELarbtFUbS9NqFGBVYh8=; b=IIqSafds5Towf50hFER6CWHuygScE6aq+z/1+9m0RyANecZVr3PMeFwbu+/GbN5Xc1 BHte0PzNnnNthDHP3xtMPszjr6+v2Qy6bCaTEvPZdc5v1uIo//KUT+dOwy/vi1K3Q7Gm 0jmSc3YR8lngtTFZAzmgZixNseH4Kd970XElLYmGeiz4+DyJVDM5zDrGP4H+m6ebdPI5 l/CvwqljxTmum1CJD/xaXu6kf3Rj3uRkaq7ZJDsF2mWzKEFsvDR6ecVi/hPfxFRdMosx omzoV5euW+ueafFl2ZWeasPlbvoohI02HxYn9JNbfnJfQbURl+P7ZXZ9CKitC8/mpmfH 46IQ== X-Gm-Message-State: ABuFfogJyTcYamHpJAhrFK7yigXaMU2wIA0d09TccIzwzM6zTwLYjbXg JcFTyfBXYi4FCx7biU/CWUsrt7C+DSSQE7atICY= X-Received: by 2002:aca:bec2:: with SMTP id o185-v6mr5708555oif.22.1538411952830; Mon, 01 Oct 2018 09:39:12 -0700 (PDT) MIME-Version: 1.0 References: <20181001100707.16840-1-ganapatrao.kulkarni@cavium.com> <20181001142914.GD9716@arm.com> In-Reply-To: <20181001142914.GD9716@arm.com> From: Ganapatrao Kulkarni Date: Mon, 1 Oct 2018 22:09:01 +0530 Message-ID: Subject: Re: [PATCH] arm_pmu: Delete incorrect cache event mapping for some armv8_pmuv3 events. To: Will Deacon Cc: Ganapatrao Kulkarni , LKML , linux-arm-kernel@lists.infradead.org, Mark Rutland , catalin.marinas@arm.com, Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , "Nair, Jayachandran" , Robert Richter , Vadim.Lomovtsev@cavium.com, Jan.Glauber@cavium.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Will, On Mon, Oct 1, 2018 at 7:58 PM Will Deacon wrote: > > 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. This works fairly well for DT based boots, since almost all SoCs have added remapping using custom dt object binding. However we have concluded in the past to drop SoC specific from the ACPI mapping and use json to add SoC/micro architecture specific events support. At present , When we boot with ACPI, it is misleading for these events. In fact, this has been pointed internally from benchmark team and reported it as hardware bug! IMHO, it would be much simpler to delete these misleading events mapping rather explaining to perf tool users. We already have proper mapping for these events, armv8_pmuv3_0/l1d_cache_refill/ armv8_pmuv3_0/l1d_cache/ [core imp def:] l1d_cache_rd l1d_cache_wr l1d_cache_refill_rd l1d_cache_refill_wr > > 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. thanks for the background info, these generic mapping fairly works except these events. > > Will thanks, Ganapat