Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp2064013rdb; Tue, 3 Oct 2023 09:08:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEbuO+avpt5WHX/ZyjoneC4chR2AyGjF4oi3OpIgx4jU5IG6Waw/4M2COztv3ii4yMcjwkS X-Received: by 2002:a17:902:e80e:b0:1c6:2d13:5b77 with SMTP id u14-20020a170902e80e00b001c62d135b77mr41662plg.39.1696349330609; Tue, 03 Oct 2023 09:08:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696349330; cv=none; d=google.com; s=arc-20160816; b=OIBuFi7joxJ0ilBcZJz9IA+yy7mpiKMgJYAgUUJr3YBvcUd0s0dvVczkrsINlqeHXH FhP0DghrE6CW8dfpaVMBT+MjcCmd7f6PbxShRMvhyxvEsInXSp/eK288Ea2XWiqBHBsx aH6ChtlL/jophjZz8Ww8UjDZwTI8WnjtElg/MxTnZUppbze+62bCzuFG71IMSZTc9wHH oj5BTyuhOutOva/xwlGkr+jb2J27ncVGaqptTjCCpibRBTaaaSyDoBzY4Bo769l6pSZj D732W2/4RtRTEjfC0LnC0J2sS3qwLhXTEBcHrF2Pwb+uv0r/KQ1R3BLBlVf094aorp8t NCxw== 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=T4R44joO8rUBs8RzaWzJZzMMX+pUdjfI1hPgJ8upKiI=; fh=EIH9XAmicvPIUSP7TBeBhZ/WaoqG49JQ3xV1i3Gl7Co=; b=0sDf40oUsFFDoQZxkGG6bwW5UW77riuRXi8AL1onOQGc0kE4ft2R/bXoRypi3C9LVA q1l/hIt/p0yuYd4M05MAutEoL5AOrSjRAVR+4J3rj5J/n25+Yi9yoxtiarkcKk6T66ik KSGAKw0sPZ9SOULLZ+Ng1t/bCIXVS7/nJbEYQrVkRZYMctecm+wzjNwSAw7dsuOOsDUL amSskdpdZtX5pA4pz8KUKl8eWEfQ4wAlpVU3GiegcSp52Pc4919PlLbyvSpI6p2yUhQl uOJ/Ss1qpsbDPFRFgbED1F8o3GfZISwSK0ag4tLlVetT66jiN6kJ01Mgqe3NcTnI9ujQ hH7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jV5vPM89; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id jz16-20020a170903431000b001a6f0eab385si1711399plb.55.2023.10.03.09.08.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 09:08:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jV5vPM89; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 82A8D81A43CE; Tue, 3 Oct 2023 09:08:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240371AbjJCQIq (ORCPT + 99 others); Tue, 3 Oct 2023 12:08:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240331AbjJCQI3 (ORCPT ); Tue, 3 Oct 2023 12:08:29 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3938BB4; Tue, 3 Oct 2023 09:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696349299; x=1727885299; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mjox4H+LtP34iAu0QGDcyJcOg++FCqom5UdHoZptHjo=; b=jV5vPM89J/YBamufYogXdUSVWn01Kcuj0rkjptHdm4/jfFtLwAZ3ANw3 hrVrRdd0hojGpKTOwrv8H7v/L2Js8YAXsCmcPTFzvpA6DrqN6T9FeAJl2 OK8ZwtIGTcB5LCHqx2z17LyM5PGhxEMUpA0YiOHeaXnvGHUi4f+iJAvho yBZCuOcVq0+PrkJ0tV3Ka77dPbEK3j7UCYXC52bRVqd85ts7pxwpnmTOs 3B+2f/P0rlYj/xUynGlsqJJSRz7qqfwyfoo2TVDyHeYffRyKCehp1bKck l20VtnwBB7lV7E16pf4VaWyXbkrncJWCJn2VX++cvaaE55lg/N7uUfgFT A==; X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="447083326" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="447083326" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 09:08:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10852"; a="998098119" X-IronPort-AV: E=Sophos;i="6.03,197,1694761200"; d="scan'208";a="998098119" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Oct 2023 09:08:11 -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 v7 8/8] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Tue, 3 Oct 2023 09:07:59 -0700 Message-ID: <20231003160800.8601-9-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231003160800.8601-1-tony.luck@intel.com> References: <20230928191350.205703-1-tony.luck@intel.com> <20231003160800.8601-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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]); Tue, 03 Oct 2023 09:08:49 -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. Signed-off-by: Tony Luck --- Changes since v5: Added addtional details about challenges tracking tasks when SNC mode is enabled. 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 cb05d90111b4..222c507089a5 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -345,9 +345,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 @@ -452,6 +452,23 @@ and 0xA are not. 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