From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00680C19F2D for ; Thu, 11 Aug 2022 06:25:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233628AbiHKGZP (ORCPT ); Thu, 11 Aug 2022 02:25:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233695AbiHKGZN (ORCPT ); Thu, 11 Aug 2022 02:25:13 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62FE463FC for ; Wed, 10 Aug 2022 23:25:12 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id c24so11485383pgg.11 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=eI8LlZ1KmGrMtiroRMjY1dasshQ/75V2MNaGHc/c0p6J6510PZJ+Gjv6pfHq+MR37E vZ9tv7EK3Qy/WvcxzGfMLeFJoAVDz9d1JJ8iYuwUIooIZwpfClYKe4R7HrrjrD8iP4Pl hQM5w6gVrOWRAwbV1uY07RLsskyIx6ZV+K9UMD7Ae56RCJdlCiEoLQUkHD8/Mu4sezmp MpZG0EWDxJ9jpCtsg8hj5xmv/ShssYIea2eYc8jyi0BLM/UbLiYKLBGtzJbOnciCjdSa 5MT3sHHQ7hl7sVsJLDi3H/xUuHkGrvDq8glc99KG65DTXW0d1TCcOxlDYe80u6xz82jO P4RA== X-Gm-Message-State: ACgBeo2vxinstEI5XWLyggbtXvC74+bx6TTcR8ylfSHjG/yyXhPbketr 4W8if8moXBdsRWCO+VPKyB90zg== 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.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 --- 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 */ -- 2.34.1