From patchwork Thu Aug 11 06:24:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 12941172 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0DA4DC48BE4 for ; Thu, 11 Aug 2022 06:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=N4LcIRzVUO/NWhwxjG/MAfUAsPhJSyl+Pu3hppvpv0A=; b=qceiWm1hD/j7+m pxsW2s5nQ6VXq67fr5q6l9A2bu5AVpYXpxTTISAxF6sCV1MuGQ6sS3P51Wj736vVI9bnNLNuFkK6t rqGB4g7vaO58+fRURwQyIj3xtgGGS9vV+A2QhslRE0iF89qdziZ74svEJ8o9gOHN8aBy84NqiEmuy SbRl1CyrborDcNoNm0U+nKr1sTjAm2w/payq7XtLTyFA8LJu6a3lhInQH/O/C1teTxHbzUlSSwpoK l0YkmfwiLUu+fu4oRFSjE9FHX3F47VP6JMpsfnTn+zfKKiR1E2sYKLGHBUVsaXW2ZYEpsFMon70ok eXlGv6Iu67shNqGVviGQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oM1dD-006quk-U2; Thu, 11 Aug 2022 06:25:24 +0000 Received: from mail-pg1-x531.google.com ([2607:f8b0:4864:20::531]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oM1d4-006qk6-TP for linux-arm-kernel@lists.infradead.org; Thu, 11 Aug 2022 06:25:16 +0000 Received: by mail-pg1-x531.google.com with SMTP id h132so16330057pgc.10 for ; Wed, 10 Aug 2022 23:25:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=lGL3k6KMKNuuvCiNMMqmkjK+KHFue89a80+crwcLhLw=; b=siYZ7oObouKZe+Tl/6XzHMY3IpQsgRALZu6IC0Yq2QRYGRPKc6zd+acOHHNfQEceRR mkymjyUwE68caQrNDICPSDsBgi0gtE3nzFiS1BJGNH7dL3VYnyqYczi3RaGBtIf+0eFa Gj8Nzw6UYtQYUyGotMrfhRQtvIezVexYBIkvb4jrrnRRrtEIAjoyPjprNa8F8VATt3po pPfdiUnxmI/zfhJOMdHzXShRJt13bdxU6Od3zm5BRdemmVeBRfyBhAZ2HgokdOznSX+f +Pj+HwQbfUxAyUp3v+IHroS/VDLpyfvfRwl3pMrGtvuK/NDwN9JrjtP3Ut3rUkG2dGhl JCgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=lGL3k6KMKNuuvCiNMMqmkjK+KHFue89a80+crwcLhLw=; b=P+9LIFc9j67pphnqjtSGRIP6Cm81yjUGAclvEzlLz1zHqWXxu+o0KfZr0Nn4XhTAxs wEFqojU/BYIvd6ass0qv/wwWDqIdn1KMdQors60nMgmJYmLtyGhxxCywJwTNPjjWRxr0 QD1d1KoV+pergzjkV6HunwNKPViQk/zCXQgHMc4uZz3ADEOx0pa+lnfLU9Yl9blacAed HxPkfScF+4GbLwAdpEVIAOitM9ns0bDxdqNVSONV3A5U09dPmCnS1KTzZv/IF113I2jf TXz+pAf5ZUaSTiXcTT1B1PQecnl+YQGn0koKLUtnLd+hxFNpQ8YdrNkFTDpyGSnBi4dM vEGQ== X-Gm-Message-State: ACgBeo3/r5j3k5d0Bt/2YXCptVYhk65bTQfbQgzAA8MtW1jmJ59xhPiZ s2qJQ+XKZg6gshFiDb69Go3TVg== X-Google-Smtp-Source: AA6agR5Cyo4gGNQg0rN+ywPMpC98QtzuyaxEieKzNGXrILRnjv3itrOud8aM2347BC0GsxQ+WH/bSw== X-Received: by 2002:a62:544:0:b0:52d:946c:b884 with SMTP id 65-20020a620544000000b0052d946cb884mr30025243pff.72.1660199111736; Wed, 10 Aug 2022 23:25:11 -0700 (PDT) Received: from leoy-yangtze.lan (n058152077182.netvigator.com. [58.152.77.182]) by smtp.gmail.com with ESMTPSA id o12-20020a17090a55cc00b001f506009036sm2766926pjm.49.2022.08.10.23.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Aug 2022 23:25:11 -0700 (PDT) From: Leo Yan To: Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , John Garry , Will Deacon , James Clark , Mike Leach , Kajol Jain , Ali Saidi , Adrian Hunter , "Gustavo A. R. Silva" , Anshuman Khandual , Ian Rogers , Like Xu , German Gomez , Timothy Hayes , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Leo Yan Subject: [PATCH v6 01/15] perf tools: sync addition of PERF_MEM_SNOOPX_PEER Date: Thu, 11 Aug 2022 14:24:37 +0800 Message-Id: <20220811062451.435810-2-leo.yan@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220811062451.435810-1-leo.yan@linaro.org> References: <20220811062451.435810-1-leo.yan@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220810_232514_986002_AD6DC3BC X-CRM114-Status: GOOD ( 15.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Ali Saidi Add a flag to the perf mem data struct to signal that a request caused a cache-to-cache transfer of a line from a peer of the requestor and wasn't sourced from a lower cache level. The line being moved from one peer cache to another has latency and performance implications. On Arm64 Neoverse systems the data source can indicate a cache-to-cache transfer but not if the line is dirty or clean, so instead of overloading HITM define a new flag that indicates this type of transfer. Signed-off-by: Ali Saidi Reviewed-by: Leo Yan Signed-off-by: Leo Yan --- tools/include/uapi/linux/perf_event.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/include/uapi/linux/perf_event.h b/tools/include/uapi/linux/perf_event.h index 4653834f078f..e2b77fbca91e 100644 --- a/tools/include/uapi/linux/perf_event.h +++ b/tools/include/uapi/linux/perf_event.h @@ -1310,7 +1310,7 @@ union perf_mem_data_src { #define PERF_MEM_SNOOP_SHIFT 19 #define PERF_MEM_SNOOPX_FWD 0x01 /* forward */ -/* 1 free */ +#define PERF_MEM_SNOOPX_PEER 0x02 /* xfer from peer */ #define PERF_MEM_SNOOPX_SHIFT 38 /* locked instruction */