Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4963421rdh; Wed, 29 Nov 2023 16:35:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IE7KJhjxbb6zQbspxZ89/He/fFQjZUO9fih2CGGqxU+ZQt2lWU+/oe2NmtkuE0UF9Uo5abl X-Received: by 2002:a05:6830:348a:b0:6bd:152f:9918 with SMTP id c10-20020a056830348a00b006bd152f9918mr27941614otu.14.1701304512317; Wed, 29 Nov 2023 16:35:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701304512; cv=none; d=google.com; s=arc-20160816; b=tfNvVnVHbp6GR19XxZ5st4ugbrxQ9ackEBct0jV3MdAW4ZeDWsf3ApFaVwTljSGnD6 QqI3zAlnoVejlvXSLthd2jpRWD5fqtvPsFpsJOYN3336LDzUW5OdgYKE4QtntNuyPx6q n6fLsV84FHIjeQUH7Xr+FSvKjNXsWzKvT3hCFwNv2BrLq+kwWAHW9xR8+G+/3ryULgMo UQNYmKOaXSyjnA09r4WEvRmCJblBK3mnJgExr1vzHoIZz8i/aB6c/j2RNBzaVXpbn87V Vv7t0+a5wYDqXCsUCKRHvArOtPAqRKuyX6N1h0CfPglB2IdoJ9WHiYCgmHsoIOI2Fx4C hFdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=p6JPmROdWk8e8A48Bq1ycG8EV4JUb36YHy0Sk1Hz32M=; fh=Vn7xSirI6nqm5i0/AysSYQOSFcHB81/IRDfzPMkc31I=; b=RhIOLE4ZgJLj4uXhyul7/z9NEtN9al3oZV3bnpZB3AHk2d7JxRRQ1Xm34g5wMbsUiB 1KuupoDGNu965XLuumKhjGPdViQ60GQafX/Fe0/D55ZBVH9yu5w7driMmm0pfKJEPdz7 v0bo2FUlv8UdTxYpH0dEIR7fIgaI7sEHIm3O1u3NekrV/1qN/meRnFQX8IxK+cmryY4v qElG8hGBt5+VeNj3TBNrqPj2XQrBNw/5xun1eki07xFBbZekPxHXYytOJhQVtrNiRhNw r554OAayiv9Uerf/xxbmh2pTZisKtsgarTn/qhLmsyHwn01OsMxDE2UlVVdW4gpXIpar bhFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TsawVPid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y188-20020a6364c5000000b005ab6142f1besi65134pgb.169.2023.11.29.16.35.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 16:35:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TsawVPid; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 9EEFA802BE43; Wed, 29 Nov 2023 16:35:03 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343989AbjK3Aet (ORCPT + 99 others); Wed, 29 Nov 2023 19:34:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343848AbjK3Aej (ORCPT ); Wed, 29 Nov 2023 19:34:39 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4937A10E3; Wed, 29 Nov 2023 16:34:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701304474; x=1732840474; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6s4aliN2TmDzt5CeaX+F72a2OR8tCz3kRRQsDMwH6Bo=; b=TsawVPidHAASCFy/97WO9se52Y9abW5/FgpDWTIU1X8JFZaGED38PdTP pcR2yY7ufi+JC5gjyJ2AILsN0NUjgTvkQWYm8hUR+JeZVX8SgLloV15bu yRgAq2h2xBDMaUWtfu4t6cCsqv7ca4zt8nItOKQYD1dYPWhDM/o5m0+PO 4qSy5YvLobvqH1AOqEVX4jEj4iZ4Gy5g2iIsGNWuhTqIIsf2kgSun8j7l Z1jl6G4tloI0mZ/Dd0dBu2UX3Yc+4wY4PGqzR+93RXjy0MaQhOddDbf3T tkeADCIKs4DNFnmPTrr/UiED7L6YwQvY+VZPYEUgmtu6QWAFrTUjQrY51 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="392990697" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="392990697" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 16:34:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10909"; a="762499593" X-IronPort-AV: E=Sophos;i="6.04,237,1695711600"; d="scan'208";a="762499593" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2023 16:34:28 -0800 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , Shuah Khan , x86@kernel.org Cc: Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , Randy Dunlap , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck , Shaopeng Tan Subject: [PATCH v12 8/8] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Wed, 29 Nov 2023 16:34:18 -0800 Message-ID: <20231130003418.89964-9-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231130003418.89964-1-tony.luck@intel.com> References: <20231109230915.73600-1-tony.luck@intel.com> <20231130003418.89964-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 16:35:03 -0800 (PST) With Sub-NUMA Cluster mode enabled the scope of monitoring resources is per-NODE instead of per-L3 cache. Suffixes of directories with "L3" in their name refer to Sub-NUMA nodes instead of L3 cache ids. Users should be aware that SNC mode also affects the amount of L3 cache available for allocation within each SNC node. Signed-off-by: Tony Luck Reviewed-by: Peter Newman Reviewed-by: Reinette Chatre Reviewed-by: Shaopeng Tan Tested-by: Shaopeng Tan --- Documentation/arch/x86/resctrl.rst | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst index a6279df64a9d..49ff789db1d8 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -366,10 +366,10 @@ When control is enabled all CTRL_MON groups will also contain: When monitoring is enabled all MON groups will also contain: "mon_data": - This contains a set of files organized by L3 domain and by - RDT event. E.g. on a system with two L3 domains there will - be subdirectories "mon_L3_00" and "mon_L3_01". Each of these - directories have one file per event (e.g. "llc_occupancy", + This contains a set of files organized by L3 domain or by NUMA + node (depending on whether Sub-NUMA Cluster (SNC) mode is disabled + or enabled respectively) and by RDT event. Each of these + directories has one file per event (e.g. "llc_occupancy", "mbm_total_bytes", and "mbm_local_bytes"). In a MON group these files provide a read out of the current value of the event for all tasks in the group. In CTRL_MON groups these files provide @@ -478,6 +478,23 @@ if non-contiguous 1s value is supported. On a system with a 20-bit mask each bit represents 5% of the capacity of the cache. You could partition the cache into four equal parts with masks: 0x1f, 0x3e0, 0x7c00, 0xf8000. +Notes on Sub-NUMA Cluster mode +============================== +When SNC mode is enabled Linux may load balance tasks between Sub-NUMA +nodes much more readily than between regular NUMA nodes since the CPUs +on Sub-NUMA nodes share the same L3 cache and the system may report +the NUMA distance between Sub-NUMA nodes with a lower value than used +for regular NUMA nodes. Users who do not bind tasks to the CPUs of a +specific Sub-NUMA node must read the "llc_occupancy", "mbm_total_bytes", +and "mbm_local_bytes" for all Sub-NUMA nodes where the tasks may execute +to get the full view of traffic for which the tasks were the source. + +The cache allocation feature still provides the same number of +bits in a mask to control allocation into the L3 cache, but each +of those ways has its capacity reduced because the cache is divided +between the SNC nodes. The values reported in the resctrl +"size" files are adjusted accordingly. + Memory bandwidth Allocation and monitoring ========================================== -- 2.41.0