From patchwork Wed Feb 28 19:37:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luck, Tony" X-Patchwork-Id: 208016 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp3570917dyb; Wed, 28 Feb 2024 11:44:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU4cCbgWOki6dnNAX/PYKRi9V4CzgffqAKvbbhpV1g4GdbQRzXKTn7PBLPoM23DX5ekdicxUszoKy4bZdanaok4Ru1YvQ== X-Google-Smtp-Source: AGHT+IE7LwFABVDQL7PLUsX0NkqKbGi4Tc1NjbY0ix9XeOQqh6USZ38KflTakgeIyIvoa7ysJrOl X-Received: by 2002:a17:902:d4c4:b0:1dc:a8aa:3c86 with SMTP id o4-20020a170902d4c400b001dca8aa3c86mr537083plg.5.1709149462404; Wed, 28 Feb 2024 11:44:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709149462; cv=pass; d=google.com; s=arc-20160816; b=00qed2TKBw1TMyeE1hAR26n+Ob1XKopz3O0s6W5h9wt9H0zcdnZY2qf8zsMBsBgwyw hrLNAVpSArkZ6PFf2qxg8ou/+Jjo5LBK6CK07f0GuANSErkBltBVAFpvbfYR8R+A9MK7 ieSI0kOTkgtp8Scr8B5hdHRukGYPQGPeW9i6x+fC1LtXlq7d4g9UbZRF0vQwKQue3ZS4 wwP5cm/G3xjJdjV7+m0hRv9ODT3+8ujjNWeuy55qKjgO5Lz0uolRJ9abOFz3pGQRDzeh YYHQ0kr/e/xh3IkiQeGvT6YZTgpVE/Coich+weS+HH4J6GfmGa4pLkcjMY2vu5g2lPvk CffQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=DXmgN7QgV+NzseYgAL2E1gp/3e6SGkFnyTtsw/yJ7TA=; fh=kDu4WSgSKQjfqS0+uR7gDD47kd+EMQAW47hbuuOMwvI=; b=kXAAumK+W4Tdrd0RvJ/5Hl+NIR6KqaZ/Z6rpWjzPrCrtNrOKGt3E4M5nKRjPk9/56l 3c2Zx7d81lZxD4t/3pYD+1tI9AurHpu/0lm6l9/wN47/5t7ZvkQ33Ip4Auulvu1jmOaZ IBlE89ovhcsvP57EIOtWRZwXevDoagYlGg9X08KG0e2UFAF8kkzcY0nqISJzTPjcvTdl EaQANIjGn8MggJbunEYbm1n+OVWEdA6s7qThzVGWp3F0op63KnDI+mYM4PRrP2eqCHR9 QGb5tAPAxBESOU+h+vv5Dk9NHFmC3TPs7nuJBpOys6V3gI+yS673VfXyiJ0x4UaaqTHG b3jA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n9uyHwzo; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85624-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85624-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z17-20020a170903019100b001dcb4ae952csi3939574plg.533.2024.02.28.11.44.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Feb 2024 11:44:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-85624-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=n9uyHwzo; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-85624-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-85624-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C07E9B2357E for ; Wed, 28 Feb 2024 19:39:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 04299135F80; Wed, 28 Feb 2024 19:37:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="n9uyHwzo" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 909F06FD00; Wed, 28 Feb 2024 19:37:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149049; cv=none; b=jKwBWH5HWvREMbtUU6IgT44EDXoqVfH6FGOaflsRd+9wcqs3pqB46ODHcPNhllgsfE7gKqP3N4c9DnMsMplc5jqxyuefLWjJOCHJvYN9E47i0apiH73lZya6hhk9oY3BalmMhxDHtHFqzVEiEHDdr8gUUHzUbTACz2gy/2PdbxY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709149049; c=relaxed/simple; bh=Zt8rdVP9ferchSPjP8MyEknFNupbw37j1uwmdwWPA+0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=eIIqGuSwhmJJeoRareTXsdY2eCo1JvlONvYWIosbn0iZfS+CHWHweYgno2znRzkysmptisYBXW0VTM0cohtCxemnEVAfhjoKq720WOihbeI3IL9eHvUpTPs2S0AfJawBkgTJ5lBhAHRz25PN3nTJwQFa/yc6Yf9REx9Qr5Q2P6E= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=n9uyHwzo; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709149048; x=1740685048; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Zt8rdVP9ferchSPjP8MyEknFNupbw37j1uwmdwWPA+0=; b=n9uyHwzoFUuhesCzQhDLVV1vMY+gvG7OkDP7FbSJbkMPu8n8xWfYwaTU BGHWmGbrTkpDSWi7toshf5BWxOXpSvI2IIlvHeT6ppkBj/lWhGkfYbOZD Yc5yyiDHuovNEr2QAcoiTGpQYqy6JLrdHw0kMn1txo7lCL0+ZwqaLU5OM CSww2MLh9jzvfYdagqtBEWSUoWw5KDMF/h+jmA3+MTuD3qWwymWHGJHIA hWpi1O4nTKWK73c7+Bsg1Yrg8B1v+Y5uQKBHkWIHrJB//DKKYi5fj4xd8 hZ0c4kx9JQ42OpQ6jgwFF1Ruh2GWoe3U2g7BCW52MR2ZppE3dr03xZ2Gq Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10998"; a="3495589" X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="3495589" Received: from orviesa010.jf.intel.com ([10.64.159.150]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 11:37:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,191,1705392000"; d="scan'208";a="7485407" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa010-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Feb 2024 11:37:21 -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 , Drew Fustini , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v15 8/8] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Wed, 28 Feb 2024 11:37:03 -0800 Message-ID: <20240228193717.8170-10-tony.luck@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240228112935.8087-tony.luck@intel.com> References: <20240228112215.8044-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792173106637239357 X-GMAIL-MSGID: 1792173106637239357 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 --- 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..15f1cff6ee76 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 ==========================================