Received: by 2002:a05:7412:3290:b0:fa:6e18:a558 with SMTP id ev16csp898999rdb; Fri, 26 Jan 2024 14:40:29 -0800 (PST) X-Google-Smtp-Source: AGHT+IGlX0bJ+31UFtcjveQclh8rf33hVgMoRK/EdT7MwoeT0xVjEPrlxYWDwv9HtlPLp/hkXXhn X-Received: by 2002:a17:902:8216:b0:1d4:20b8:abfb with SMTP id x22-20020a170902821600b001d420b8abfbmr461620pln.68.1706308829355; Fri, 26 Jan 2024 14:40:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706308829; cv=pass; d=google.com; s=arc-20160816; b=D7IkFaTr3ixpVWMItRuG52YiZZOS8KPBmbpFaDBESH/Usd1AF1HUas6zcu3na0YsQo oDxA9XBOhOybFB9Ed9qW1DhSUKpl4MjiPCMUtJiACXTZdmECNG8ktqOWxBO3+UFQwCb2 cpUFgrnkk0FaJF4Adp4z49wMFJZ7yKoBqlj+rgm7G1mJtbNut5nWjukXu17uzRJI7KlJ orKQydj2TSD9+E607P487p5fwRihVDmAupBYYyxFqhZiLmKLy/eG9GUXDM1e/GX73QhS 0xrxMMKPR8mb7AApf1ClEhczaMVxwV6S3QJnb31k97dccdqPu1SIFQ4QFh14RvRM3UN2 eHqA== 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=+V6jLOwP+e+Kr3FLGFcFVHRrtQn5NRFf4EDfceyjDYM=; fh=HLXMJXVrjdrMO+t+ScLYZOc/r2GkIgI4c473at4vdrc=; b=HLjXI47hylahVRTZVqokSutG6t9tOjAwh1l8PzI8aBMlA/3M7fw9n03mjmppENNIYj GWOsNpe989bglpytY1drCKKxl+kjAVMsf5Z5136H9lBUJmu2kDmYsEx2AE8p8o33oWUR ZtYm4T4eB/ErYpbku6yRWZyGu7fkwx9dZItepJl9PjsoVqp3nOrwQ39LVdudfEsUdMy/ qKOIqxPIBWJhoTKjEch1aGydXWN9a+URviZRRtwilHf6Ic2r1ZBNfU/GIOBy/u1NA0Qe 654TWMBQRrSLTuMqZ9bnfLT2MDzaiXxYlb6Urh9n1UW+nf/TFeQdSzXLJEBNILuvNgMV kBTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ShLMIj/I"; 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-40792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40792-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id w5-20020a170902e88500b001d758961c79si1816449plg.13.2024.01.26.14.40.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 14:40:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-40792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="ShLMIj/I"; 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-40792-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-40792-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id E629E2859E5 for ; Fri, 26 Jan 2024 22:40:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C02EB57868; Fri, 26 Jan 2024 22:38:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="ShLMIj/I" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (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 08EC553E21; Fri, 26 Jan 2024 22:38:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706308736; cv=none; b=E7lOPSfl3em2qLQkLRscWua5u+0/llqXsiWBUGRKZxsHItX9VB9jKQRaouGHgPufOFawu7aV/NwexwAREvYim9QTvvc4SVnYAnFFmnCtBOvJbadFwF04e3B+G6BXrIhsMV1i9DbuZimRjKAXkbxRvx282UFfvi2FSa24vvivtKU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706308736; c=relaxed/simple; bh=+qqwl/QGgrcrhJ6bwo0zQQqegC4LYQZlox3muG18Qkg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GCYI4FZ0aPuomqX67vn9CtFkpLsO/slELVuuwzkz7oxh3HRfJgoFv7ER42QBGYprvbxYwpppYjE3L92e6+tHS/sj1+XOXfGuOO3nlj8cSHrCFWyR9C1aldpsK/8l7qRWpvho7n1K/tZbrPQrpBNr9HXHkIvYlD2i39MRSM5E4Is= 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=ShLMIj/I; arc=none smtp.client-ip=198.175.65.13 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=1706308735; x=1737844735; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+qqwl/QGgrcrhJ6bwo0zQQqegC4LYQZlox3muG18Qkg=; b=ShLMIj/IcOhThncZTseopq8nB4U29kndK9WytHdSBB+zXunf7x7CLNF4 F0iO0y5nI8cpLygXuhI4dGA+o6WjhK2nkWVLEfl8Qv2BYeRuu8sLH+bIL vtBmV4dMxT8/vXggUtVNPaAdqdGkW1ffLukrKNX3PfJZItF9Q2fPDQD/V FwhbjlFAZGGCg1RsS1C1pAr65DDF3MVfWREV9NAbGPxKUNMdyHq5GxCJi xmm/GX3rANcEDiYKZojxTflCTyTCUQs6lE8DuhahfXEPu6bXau7Lp+TjE Krk/AGh6ww+TjGSanFpdNcoRQoJG38voE6zYgyUVEi/0f4NlKdhS6DoqC Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10964"; a="9707742" X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="9707742" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2024 14:38:49 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.05,220,1701158400"; d="scan'208";a="35560272" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jan 2024 14:38:49 -0800 From: Tony Luck To: Borislav Petkov Cc: Fenghua Yu , Reinette Chatre , Peter Newman , Jonathan Corbet , Shuah Khan , Shaopeng Tan , James Morse , Jamie Iles , Babu Moger , Randy Dunlap , x86@kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck , Shaopeng Tan , Babu Moger Subject: [PATCH v14 8/8] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Fri, 26 Jan 2024 14:38:37 -0800 Message-ID: <20240126223837.21835-9-tony.luck@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240126223837.21835-1-tony.luck@intel.com> References: <20231204185357.120501-1-tony.luck@intel.com> <20240126223837.21835-1-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. Tested-by: Shaopeng Tan Reviewed-by: Peter Newman Reviewed-by: Reinette Chatre Reviewed-by: Shaopeng Tan Reviewed-by: Babu Moger 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 ========================================== -- 2.43.0