Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp1297255rdb; Fri, 20 Oct 2023 14:33:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG46pji5XZa1pFoDwV70R9n+3Ti94Q1zQunrzSNZAEksd/JNFnWUKW9g3STha9IC98x+2Y X-Received: by 2002:a17:90b:4d83:b0:27d:a0e5:2a67 with SMTP id oj3-20020a17090b4d8300b0027da0e52a67mr3275153pjb.18.1697837599844; Fri, 20 Oct 2023 14:33:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697837599; cv=none; d=google.com; s=arc-20160816; b=epzcJvPdyj0zFxGkrodsFi17OVsKjxO++EbhoMPHiX6lg3CFG/GnhPB4/Z4ZOquTre 5T5NzH189TcE6q4zVxKDsUAJqnDKkpdDCnfq2x7/HXsGleHsdwOxolzyBINsjhHIw/zr XOrUz7OG001RebN+Sroj5P8yhcxDj4v3jQSpIk9thoq5AkUNA0w+HgjRL7aH1FPWqDOX Y+z/k2Xkv3FviFu+ZRvByU3qxGJPawzWNjl+XzIIS0QLZqQ+vjvmB7p30iuzk6ssfQQ/ NtwIb3I9hAt788YO++YRwD6qMiLgINg53mWmDxb2h4qvGimOBfx/TGbYhNgmQsVqasB1 9nqw== 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=urpp8WT5oTBbkLR+DlK7s29EGqfPq+BYQs0qSc/2Qzo=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=w5mRm6dMjEw7aEFZ4fCdJqvyxXeqMNc/AbaY40kxZR5OJ6nVxEathyRDLuisL6BAQm VKZUXci+y92ROO+9SzDN5QM+bUxhhrv0YM1C063JhpaFVMYBFliesG9oqjHmhLz2JskU ph3nqk5SFVxlDx8a9zLCcIDSehT0Q9+I32VE2EK/wBE/V1lAisIiUUuOGFDNpqeK57Ob jN7df3BzUsyaxrxjT35k+Eitv/blCFosEHmrTg4rJ111LePXyfyMMWY2RbUo3Ck9ZYvv CRBGPoohbf2vaBBxR3AzAHoZswtLCeViKGPyv4Tb52qvunhbBdwD6ZheGdwt5D2xqej7 7gcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kU6YjZcX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kb11-20020a17090ae7cb00b00276571c0d34si2853899pjb.6.2023.10.20.14.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 14:33:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=kU6YjZcX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 6E053832FDA8; Fri, 20 Oct 2023 14:33:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233215AbjJTVcO (ORCPT + 99 others); Fri, 20 Oct 2023 17:32:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232860AbjJTVcB (ORCPT ); Fri, 20 Oct 2023 17:32:01 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9454D7D; Fri, 20 Oct 2023 14:31:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697837507; x=1729373507; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XsD7RMOBK+QP/Vh09NEqgiBSp4V/6/e9uwNicno2Kjw=; b=kU6YjZcXpP8F0fp+Rn5rVeGavxa5AiL9S2aKQwDCqzHXRAcgQ71E4lgV 4xXLawbQJ8IsfZG/KzX9Bu94w+inVcjIXjGVrsYTpzwCgfbN2kLsCK3OE SNfwIZCM9KPg7F3rhY/vl/r92FsVxsNGxUr8D6bEcsoUQVIGDl2x1xsB6 kYhC6tvhJyoeTEPXNDBXuQhgg5853v01Ne7e771LKu/Xb4fyoSchlsKQ5 ohQhC1aipK2igmn9xW2vyug4YlVKidgDfjUkHp1YOlDngzQgDsaX+ICyL KanvFsm3h4/YwinY8JVkkmOdpE7EOErDi3S+PcttBVeymnA32hx6SZXrH g==; X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="371647201" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="371647201" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 14:31:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10869"; a="881184553" X-IronPort-AV: E=Sophos;i="6.03,239,1694761200"; d="scan'208";a="881184553" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2023 14:31:12 -0700 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 Subject: [PATCH v9 8/8] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Fri, 20 Oct 2023 14:31:00 -0700 Message-ID: <20231020213100.123598-9-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231020213100.123598-1-tony.luck@intel.com> References: <20231003213043.13565-1-tony.luck@intel.com> <20231020213100.123598-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email 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 (groat.vger.email [0.0.0.0]); Fri, 20 Oct 2023 14:33:14 -0700 (PDT) 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. Reviewed-by: Peter Newman Signed-off-by: Tony Luck --- Changes since v6: Added Peter's review tag Documentation/arch/x86/resctrl.rst | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst index a6279df64a9d..d1db200db5f9 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -366,9 +366,9 @@ 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 + 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 have 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 @@ -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