Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4732828ioa; Wed, 27 Apr 2022 09:54:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyTsiHYFo01mjL/NYH8u2sAUvnzHL0yjnBkeTEkkTHBRBUdO0/2Pb9Z9zwSd4TVRsv0AH/ X-Received: by 2002:a63:fb56:0:b0:3aa:cec:6b6f with SMTP id w22-20020a63fb56000000b003aa0cec6b6fmr25192526pgj.409.1651078471308; Wed, 27 Apr 2022 09:54:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651078471; cv=none; d=google.com; s=arc-20160816; b=YHrm4K3imJ5QukiPlVnaBpcZYJ5UqrQISMMjZ/PxuzVN5mEMBdZVsnGfOtEwSn/OcI 13LoQl8pKF+ZsIKdSqQcO9S8D51lGg5KOzMoSWim5KqGEwMYkzbGTpczPfoUd97xsb5/ qEZEfgxw2LBGcLABK64JYdRpfLcjp5BgKmm3jiS1Mynq8j6EvOcQ1rx9MV+NIlhEqB+T vrKRRR6yIt2GLVOHeyjahbwhBueRslFjivu/WM4sH6Wuje4kF58vS/ywGWF5DetIB8A1 dB75JaxMuTS+SlA5ELFaOlKKFmNAkdzmD1ai1AVfUmAb8v4fspLPgDlLYMsFGGUXyNWQ GdnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=fB+D/7pJaYmPUCdn8kycmM+Ul0B8R84B43ZQd5gS8Kc=; b=MQ7l03XjX4H+Tpz2KG6iNbIEyVormWAf7uYg5b1MXgAUcZ/GMpLeRE8Vg69Ar+/NPp pWGcxwW3TtwHdLK7w50qSzWIAcefj2TF8Gaj7VOVg8WCsg01uDsfqS/sHAqUoACglv6L sdxQayif3EKDCOFuJO1SgzzTozUvMYyhlgV2bRcVNUuprEu3vDX0yhdYwOmhaZ96E+ux oT7lGTXRtphGlnyNCafxBlUteO7KADFFWJPHWA+b8H0bEdi2GJSkCgMdRFCxLJZJrLCd zp/HiDyupgSC7jxzExNWFcdFg/twVi7oO3fCUvygdVGj9WbBaktk0ZB1Z4GAjYXLr+Rc loCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gIiaVIaQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d6-20020a170902b70600b0015d078de5b9si2074486pls.30.2022.04.27.09.54.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 09:54:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gIiaVIaQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 65578338B8; Wed, 27 Apr 2022 09:25:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242526AbiD0QZt (ORCPT + 99 others); Wed, 27 Apr 2022 12:25:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243621AbiD0QZH (ORCPT ); Wed, 27 Apr 2022 12:25:07 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7ADC32378CF for ; Wed, 27 Apr 2022 09:19:20 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d15so1990204plh.2 for ; Wed, 27 Apr 2022 09:19:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fB+D/7pJaYmPUCdn8kycmM+Ul0B8R84B43ZQd5gS8Kc=; b=gIiaVIaQWTRSTYO0iYSxismgtGatUVsnHjsreouyLf2MOb9MUu/wnU4zqgB5cLTxgX ROBO6loS1ZzQ9c3K4+heCtVCySqvO8yulB8m9PzGXIB80JNY8KbbYNf0ippFZ82sA0gW Dfx6gtUdAp38Ae7mwl133SlUtYWxa+MBJe10b8PAcQ8PBooPuOOXu3rz/AEfDEobWEh9 emOr42AABxdRsOegkMJPUEAunHrf8V0foOoeiPEEPC95Uia/bPGuLK0w07ecNtOhrY0W jjW5qiSbK66lahdI3MB20owZwmOdaksuGRcjSywwOeg17cTeppFGSbctYPFk0WMBgaxs Z4lw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fB+D/7pJaYmPUCdn8kycmM+Ul0B8R84B43ZQd5gS8Kc=; b=gJmfGZk4SpNO4j8ndhAQE+EmoOU/3Nv/XDjTF/5BdyjHE5U08LCS/bU2F7WtpSJToV hecWOywg/rpqCuD0enTnxkan8mwHypVOJs3VzwEnlwAspCtyMKLk6LvicN0w7IUzpLsA WsZ+0YJt/pw/bSA9hoUpW9OGUs8A2uOC5Wd0oKJDw9GwKsAPbIYLB3Qt/ePIvXAP3Aee 1pMGj7SZVIcikd5cFsnZ/+WGCO6XS5AqPV01CJNkQwQRuarasC4F/uR+K6qMY+akME/F Mwm5YDxgJWT1q5ZMcfeYgpnbfcbffgDksJjnYOQQmvGx3vmDMpuwyENtGzcUf8GPXIL0 TO+Q== X-Gm-Message-State: AOAM531AMqgBG9+KbUFCYwuLI6GmCfDmRjsgL2cTpS3+diCg6p2W4y1s NYCZ9kgjkSwyYU7Gktu4jcTg9g== X-Received: by 2002:a17:902:cec4:b0:15d:50ba:d9bf with SMTP id d4-20020a170902cec400b0015d50bad9bfmr4430492plg.28.1651076358662; Wed, 27 Apr 2022 09:19:18 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([134.195.101.46]) by smtp.gmail.com with ESMTPSA id f10-20020a63de0a000000b003aab55ad590sm17681133pgg.93.2022.04.27.09.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 09:19:18 -0700 (PDT) Date: Thu, 28 Apr 2022 00:19:08 +0800 From: Leo Yan To: "Liang, Kan" Cc: Andi Kleen , Ali Saidi , Nick.Forrington@arm.com, acme@kernel.org, alexander.shishkin@linux.intel.com, andrew.kilroy@arm.com, benh@kernel.crashing.org, german.gomez@arm.com, james.clark@arm.com, john.garry@huawei.com, jolsa@kernel.org, kjain@linux.ibm.com, lihuafei1@huawei.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, mark.rutland@arm.com, mathieu.poirier@linaro.org, mingo@redhat.com, namhyung@kernel.org, peterz@infradead.org, will@kernel.org Subject: Re: [PATCH v5 2/5] perf: Add SNOOP_PEER flag to perf mem data struct Message-ID: <20220427161908.GE562576@leoy-ThinkPad-X240s> References: <20220422212249.22463-1-alisaidi@amazon.com> <20220423063805.GA559531@leoy-ThinkPad-X240s> <8e09af67-a416-4ead-b406-6c8b998de344@linux.intel.com> <20220424114302.GB978927@leoy-ThinkPad-X240s> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET,RDNS_NONE,SPF_HELO_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Kan, On Mon, Apr 25, 2022 at 01:01:40PM -0400, Liang, Kan wrote: > > > On 4/24/2022 7:43 AM, Leo Yan wrote: > > On Sat, Apr 23, 2022 at 05:53:28AM -0700, Andi Kleen wrote: > > > > > > > Except SNOOPX_FWD means a no modified cache snooping, it also means it's > > > > a cache conherency from *remote* socket. This is quite different from we > > > > define SNOOPX_PEER, which only snoop from peer CPU or clusters. > > > > > > The FWD doesn't have to be *remote*. The definition you quoted is just for > the "L3 Miss", which is indeed a remote forward. But we still have > cross-core FWD. See Table 19-101. > > Actually, X86 uses the PERF_MEM_REMOTE_REMOTE + PERF_MEM_SNOOPX_FWD to > indicate the remote FWD, not just SNOOPX_FWD. Thanks a lot for the info. > > > > If no objection, I prefer we could keep the new snoop type SNOOPX_PEER, > > > > this would be easier for us to distinguish the semantics and support the > > > > statistics for SNOOPX_FWD and SNOOPX_PEER separately. > > > > > > > > I overlooked the flag SNOOPX_FWD, thanks a lot for Kan's reminding. > > > > > > Yes seems better to keep using a separate flag if they don't exactly match. > > > > > Yes, I agree with Andi. If you still think the existing flag combination > doesn't match your requirement, a new separate flag should be introduced. > I'm not familiar with ARM. I think I will leave it to you and the maintainer > to decide. It's a bit difficult for me to make decision is because now SNOOPX_FWD is not used in the file util/mem-events.c, so I am not very sure if SNOOPX_FWD has the consistent usage across different arches. On the other hand, I sent a patch for 'peer' flag statistics [1], you could review it and it only stats for L2 and L3 cache level for local node. The main purpose for my sending this email is if you think the FWD can be the consistent for both arches, and even the new added display mode is also useful for x86 arch (we can rename it as 'fwd' display mode), then I am very glad to unify the flag. Thanks, Leo [1] https://lore.kernel.org/lkml/20220427155013.1833222-5-leo.yan@linaro.org/