Received: by 2002:ab2:7444:0:b0:1ef:eae8:a797 with SMTP id f4csp3015lqn; Fri, 15 Mar 2024 11:02:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUkYtWYAq/2r6EmoHB9JE12XCurpUOqhSviRDn3zsYnBfhLX5ja4iyzYSjbinGuE7MjH2zfPE6YysqEpzNuTmmwDev65MdH3UDv4vNYzg== X-Google-Smtp-Source: AGHT+IEKJQDlbB7gLUHuRHGGVak6cLPQsTsbaUONsopLxBor2hDgTrhfumCV8Y19V3OL7Wd8wY3Y X-Received: by 2002:a17:902:da8d:b0:1de:c6d:ce45 with SMTP id j13-20020a170902da8d00b001de0c6dce45mr4630407plx.13.1710525743970; Fri, 15 Mar 2024 11:02:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710525743; cv=pass; d=google.com; s=arc-20160816; b=EOU43AStGq/t6uh4rd8qnfwbs0PkYx9UyYTxMyX0uOYDuh5UbnEkqMTwS/Ax6kaWNA 08cj5D/gqQzDBlGJjZZ/VVYK/6ocHKn4t/sJ2xpdaCWTDRYcdBZKx5ByyKUvmbbRq0LO OY7aoS6cU4t4gmF7kSgVD4iy3NNaVRIRCpWpcIZ6qvBOX+0U/xWQUxfpAR9aGX/LJ7mk V2xehIV0tdTYGKetVpktXegf9rmoEVRyW3dY0B8mqJftXNwm/P1ZZTjqxcF047Pvx37H /2gImE5p3sVQ18WXOCpe9k0hVB4IeBRqbgK7SJFZida2KIF4cQodke1LeYrnCqZ894vf RKVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=JOMmvTgUFC5Mw8wpXrT7xxPfDzXLu0WxutiOc3qEMTs=; fh=2D42ZhHNRzfZw/6z8HDfkA3ayBtylZpGilny/ckCrxE=; b=X+TucFC1zuoMzLoi49LflLXWkpB8iV6xrJwqAyyo74Z3TZfqQo8SRkntCIqdfcc/ZP uL0R4eSS5r6gzrRqXNlKVvkZlzRhzNs0OAjo3QDYnj/KEndrRnvLMniG2xenuHj523O7 7jtogI7qhp5o1CuanNss9fDexHsTo12Ng95q9s5DXlsjHrl0eaiOlSdqAoKdbjeEZDq0 74rQL+FW1FDbOMJo3tv26eIGfAwn9y7rjNlzRB8A3jqBmdTtmNckLFoQn5db+B2kkcXk EdU4rWVfmCQqwrvqJeJtwbmEwbids2l/BD8rZmk6nydVbhPEcyp5p9vM4FL8dtOr00I4 vR6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-104761-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id lk3-20020a17090308c300b001dd8c0a1cf2si4028945plb.610.2024.03.15.11.02.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Mar 2024 11:02:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-104761-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-104761-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-104761-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A66C828527B for ; Fri, 15 Mar 2024 18:02:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9A3964CE0E; Fri, 15 Mar 2024 18:02:16 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 117B646548; Fri, 15 Mar 2024 18:02:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710525736; cv=none; b=o6YNFC1TWl+9nizk+ZoeuAvjCTki/Zi5lRYiLU55rakPvAItKPSuzM/qGXR6077PNDaxy6V4xL6pFnWTNe5bmxCC4oot+BdToJUx2WKJBtOEQmCgFsQm03zV/E1S3FyJfRRFTgy5+rou3J35KlbWGw0tfRh/0epToQTbaoRz9pk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710525736; c=relaxed/simple; bh=Tcuht5PH6shYhP4N68qoB2RRRoW6Kd4Ty8D7HYyBhM8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=YCxZRRW7+p/66Wf67dAm6bkaeoov7sht+KpZUZ0dF/6Y/xYNoXMrya3x9LctRAP1LyiQBZq8s1tsnlr0LvgADkrTVhEjGiEzvmLh8oaD2p4uhUS2Zt4vufhKuy6ua4r3GR5d6h2fppPXKWAOTQI4YZLqeEqAZeheeSH3NmqtaAk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 48E31C15; Fri, 15 Mar 2024 11:02:48 -0700 (PDT) Received: from [10.1.197.60] (eglon.cambridge.arm.com [10.1.197.60]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B3C073F762; Fri, 15 Mar 2024 11:02:11 -0700 (PDT) Message-ID: <88430722-67b3-4f7d-8db2-95ee52b6f0b0@arm.com> Date: Fri, 15 Mar 2024 18:02:10 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 4/4] selftests/resctrl: Adjust SNC support messages Content-Language: en-GB To: Tony Luck Cc: Reinette Chatre , "Wieczor-Retman, Maciej" , "Yu, Fenghua" , Shuah Khan , "ilpo.jarvinen@linux.intel.com" , "linux-kernel@vger.kernel.org" , "linux-kselftest@vger.kernel.org" References: <159474e6-ef11-4769-a182-86483efcf2a6@intel.com> <0393c4ce-7e41-4dcc-940a-a6bea9437970@intel.com> <55a55960-8bb1-4ce2-a2c7-68e167da8bcc@intel.com> From: James Morse In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Tony, On 08/03/2024 18:42, Tony Luck wrote: > On Fri, Mar 08, 2024 at 06:06:45PM +0000, James Morse wrote: >> Hi guys, >> >> On 07/03/2024 23:16, Tony Luck wrote: >>> On Thu, Mar 07, 2024 at 02:39:08PM -0800, Reinette Chatre wrote: >>>> Thank you for the example. I find that significantly easier to >>>> understand than a single number in a generic "nodes_per_l3_cache". >>>> Especially with potential confusion surrounding inconsistent "nodes" >>>> between allocation and monitoring. >>>> >>>> How about domain_cpu_list and domain_cpu_map ? >> >>> Like this (my test system doesn't have SNC, so all domains are the same): >>> >>> $ cd /sys/fs/resctrl/info/ >>> $ grep . */domain* >>> L3/domain_cpu_list:0: 0-35,72-107 >>> L3/domain_cpu_list:1: 36-71,108-143 >>> L3/domain_cpu_map:0: 0000,00000fff,ffffff00,0000000f,ffffffff >>> L3/domain_cpu_map:1: ffff,fffff000,000000ff,fffffff0,00000000 >>> L3_MON/domain_cpu_list:0: 0-35,72-107 >>> L3_MON/domain_cpu_list:1: 36-71,108-143 >>> L3_MON/domain_cpu_map:0: 0000,00000fff,ffffff00,0000000f,ffffffff >>> L3_MON/domain_cpu_map:1: ffff,fffff000,000000ff,fffffff0,00000000 >>> MB/domain_cpu_list:0: 0-35,72-107 >>> MB/domain_cpu_list:1: 36-71,108-143 >>> MB/domain_cpu_map:0: 0000,00000fff,ffffff00,0000000f,ffffffff >>> MB/domain_cpu_map:1: ffff,fffff000,000000ff,fffffff0,00000000 >> >> This duplicates the information in /sys/devices/system/cpu/cpuX/cache/indexY ... is this >> really because that information is, er, wrong on SNC systems. Is it possible to fix that? > > On an SNC system the resctrl domain for L3_MON becomes the SNC node > instead of the L3 cache instance. With 2, 3, or 4 SNC nodes per L3. > > Even without the SNC issue this duplication may be a useful > convienience. On Intel to get from a resctrl domain is a multi-step > process to first find which of the indexY directories has level=3 > and then look for the "id" that matches the domain. > >> >From Tony's earlier description of how SNC changes things, the MB controls remain >> per-socket. To me it feels less invasive to fix the definition of L3 on these platforms to >> describe how it behaves (assuming that is possible), and define a new 'MB' that is NUMA >> scoped. >> This direction of redefining L3 means /sys/fs/resctrl and /sys/devices have different >> views of 'the' cache hierarchy. > > I almost went partly in that direction when I started this epic voyage. > The "almost" part was to change the names of the monitoring directories > under mon_data from (legacy non-SNC system): > > $ ls -l mon_data > total 0 > dr-xr-xr-x. 2 root root 0 Mar 8 10:31 mon_L3_00 > dr-xr-xr-x. 2 root root 0 Mar 8 10:31 mon_L3_01 > > to (2 socket, SNC=2 system): > > $ ls -l mon_data > total 0 > dr-xr-xr-x. 2 root root 0 Mar 8 10:31 mon_NODE_00 > dr-xr-xr-x. 2 root root 0 Mar 8 10:31 mon_NODE_01 > dr-xr-xr-x. 2 root root 0 Mar 8 10:31 mon_NODE_02 > dr-xr-xr-x. 2 root root 0 Mar 8 10:31 mon_NODE_03 This would be useful for MPAM. I've seen a couple of MPAM systems that have per-NUMA MPAM controls on the 'L3', but describe it as a single global L3. The MPAM driver currently hides this by summing the NUMA node counters and reporting it as the global L3's value. > While that is in some ways a more accurate view, it breaks a lot of > legacy monitoring applications that expect the "L3" names. True - but the behaviour is different from a non SNC system, if this software can read the file - but goes wrong because the contents of the file represent something different, its still broken. Thanks, James