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 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 C3E2BC433EF for ; Sat, 23 Apr 2022 06:39:46 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uKo2fE/ym79bE4n4Izm+uN2/9YrUgVKJEKd3wQLRQqw=; b=xYJUAJtg1aUffS VsgNsg3XMdJy2uVYvkkztdjvpedhky0bVM9PHOq55fe3VxYBZ8nefU3rbn1fuUWus3T+9JjuEXoMG GLkCrtqEHHqUJhHbYJ7IiptHp02vu1rDeX/quCTnboDeP9t1VmI5D776/JXvgQ1JVTl4f5x4TRqBZ 0sRa8DKPlzOXolblgw/JnNNjjF1DH2uPwkFBRUSh7rwkpq+MWNosVJ9lIbSyI2/4+uozN9sI8GZtT fMAdIqwWhpbqFELYIHAdgIpZ7VtXZLIJZT4cjdxLvSw/Lrlii44SE6Jg3CaRZnElmr7UJTs+BbM1c z/TN+jyd7BY5rAgo42RQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ni9PR-003ZfK-81; Sat, 23 Apr 2022 06:38:21 +0000 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ni9PN-003Zdy-O9 for linux-arm-kernel@lists.infradead.org; Sat, 23 Apr 2022 06:38:19 +0000 Received: by mail-ej1-x635.google.com with SMTP id u15so20112925ejf.11 for ; Fri, 22 Apr 2022 23:38:15 -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=JfYNk7PKym38MlGAXyXafcCNWPn+2drPWLNtsAJTZac=; b=wYRkumz1HH5a5k41YA/3eyDDbvnMB1QTrSknt8c1j99bwzKt02sO/yGBsz4l9qzhVx JdgMXmnVnqe5kV8Html2wprELfIEpNmTRD3bGakgJS/qHVWcPU+sLDjpFY+jOl9b8+T5 LKtUZ6In5Mvp/0CB6hxnHt12qThKxTApkJxaOik1N8AUYqMwHSGe4WZB8Y7lXZ58hRma D81PrYOUXEPCCSE4QAkX2/wFJngtAzRzub/zH38Bf1ZeFUv6eAyW9KHYipZpX+NZSUo9 +LXdpkcwiBohl6gk/mtgxvVf6x2fv+6i+6lKMMNVHEktGiUyRGwDJ4YYBudkReeqX6EA 2WNA== 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=JfYNk7PKym38MlGAXyXafcCNWPn+2drPWLNtsAJTZac=; b=NzoN+QsmoOExJdWtm9R8WPpdMiqnU2fiWUf7m43WcoXo2jzU0t3I4aqM8d2s0qqZyj kID/zPr1muVLHI+VdVKQAbttGzHegyAD/SY1EGgGl/EVH9RQT4/dU/dKYAhhvpLVHVOf OUxuAZ2ur0PnbFxoBXT/mb3dH7F0Kzmf9I2NQy2A3S5i/nBCA+KHELJ4KEVpdik5vlWo UFPLHQtG6+q7jg82SIRBQ3t6jcP0BfGFKhOX8jEZYh5CxcsuNZIhBBM+ymblmtkmD9+c BmbHdhcRJ7LjV7aVO8YsVt3hClW8I3J6VfxBHHY6ArBrc1f/l6z5GIIVQrlBlceehUrq qs2w== X-Gm-Message-State: AOAM532lH5KLmfu1yO/iZ9WAgBmP4/4gUywy+aiUP/1hyBC6dAZ+MeRb EODP/bAecAfoyMvPzURMVHMEuA== X-Google-Smtp-Source: ABdhPJwzivo8NzW2VqVoaWDBZYgI3SnzZw9bPgroasDWLZL3hitJGtp3e92gxF/3V81cOzkCePJQXg== X-Received: by 2002:a17:906:5d12:b0:6f0:17a5:6053 with SMTP id g18-20020a1709065d1200b006f017a56053mr7275588ejt.635.1650695894463; Fri, 22 Apr 2022 23:38:14 -0700 (PDT) Received: from leoy-ThinkPad-X240s ([104.245.96.34]) by smtp.gmail.com with ESMTPSA id x12-20020a170906134c00b006ef8be0e8e9sm1398092ejb.168.2022.04.22.23.38.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 23:38:13 -0700 (PDT) Date: Sat, 23 Apr 2022 14:38:05 +0800 From: Leo Yan To: Ali Saidi Cc: kan.liang@linux.intel.com, Nick.Forrington@arm.com, acme@kernel.org, ak@linux.intel.com, 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: <20220423063805.GA559531@leoy-ThinkPad-X240s> References: <20220422212249.22463-1-alisaidi@amazon.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220422212249.22463-1-alisaidi@amazon.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220422_233817_837121_29C8AC9C X-CRM114-Status: GOOD ( 20.67 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Apr 22, 2022 at 09:22:49PM +0000, Ali Saidi wrote: > > On Fri, 22 Apr 2022 21:43:28, Kan Liang wrote: > > On 4/22/2022 2:49 PM, Ali Saidi wrote: > > > On Wed, 20 Apr 2022 18:43:28, Kan Liang wrote: > > >> On 4/8/2022 3:53 PM, Ali Saidi wrote: > > >>> 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. > > >> > > >> It sounds similar to the Forward state. Why can't the > > >> PERF_MEM_SNOOPX_FWD be reused? > > > > > > Is there a definition of SNOOPX_FWD i can refer to? Happy to use this instead if > > > the semantics align between architectures. > > > > > > > + Andi > > > > As my understanding, the SNOOPX_FWD means the Forward state, which is a > > non-modified (clean) cache-to-cache copy. > > https://en.wikipedia.org/wiki/MESIF_protocol > > In this case the semantics are different. We know the line was transferred from > another peer cache, but don't know if it was clean, dirty, or if the receiving core > now has exclusive ownership of it. In the spec "Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3B: System Programming Guide, Part 2", section "18.8.1.3 Off-core Response Performance Monitoring in the Processor Core", it defines the REMOTE_CACHE_FWD as: "L3 Miss: local homed requests that missed the L3 cache and was serviced by forwarded data following a cross package snoop where no modified copies found. (Remote home requests are not counted)". 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. 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. Thanks, Leo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel