Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1352564lql; Tue, 12 Mar 2024 14:44:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXX0eESTqavldVmsUlAaWSWIDreISg200sie/uc96eCIATOMOQm5MF4DBd9YpTKfnp9R9X9INK83zEFbxtk3MPViA2GJanVYiiybYafwA== X-Google-Smtp-Source: AGHT+IF0y/8N2LuB72Ty84077IhyuKWqxonQz4pDFe9/Bt2iVIcFYUs+wQFAhp3BenBZIApo9G/A X-Received: by 2002:a05:6a20:728f:b0:1a3:2605:6894 with SMTP id o15-20020a056a20728f00b001a326056894mr3591122pzk.45.1710279889545; Tue, 12 Mar 2024 14:44:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710279889; cv=pass; d=google.com; s=arc-20160816; b=aLOWkTfWmrzILUGEZSgyqGWNH+LPv/HdBn+04qYtbd+eh97SiEm0llo9Iqo2TpJqw6 I2sC5pu3O3IH9r6tA3wnRrq/sOyp92jFjJsT0Zdrv95FOXmqGCPYEERBHmWxmJcIBilM r7vWyt+r0FLPEiXXTsz0/ACcRQHNRk7qXY0XJvf14DHdO3O6piGs5G13GL/9dDbm2a6W 0hUlXXdDILwEv5Obt79nryYl7YzvbLNYseKj/tB5mLwTpfm2gmA2wHeXyEM1HdBvA6uX Ndj3RMBmwd5duvfrcdQ5Gp41l7avZ2vTYYkhLdZoSwMtms01byuN7Q9qkWdUS8Vspxoe ENBw== 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=hEJeeqWo8IieAq6BTUjzrp+/OqWZ20xCNwFCti9sK0g=; fh=kDu4WSgSKQjfqS0+uR7gDD47kd+EMQAW47hbuuOMwvI=; b=tR2fatGT2+5G6Lw2a+LA3CG6GmBxAPyo5UtDwLrSvJKBqggbOgnbPa4Sywf8V0rU97 xSkWc0Ivhi07Vdm6khVdOUFCAd3moEWHoXOa6C7HIzp5SE7c7f+IuJ3XT02O6jWbLDSq LFAGlcZCQdNg3EP0YIIKT6NAalzNBg5BdpH9cNo+Fj0Uue4GAlOhogsN3tq1Dp0izZvb Bg1zI73JfdxS0+UNQTQ++u6Y6EWh2r7iOSF8SOqFMd2FSGO1O1CKXPeI+/tMVWLw243A 7mXg++CPquf5N5EM4oyAo75miAlQve3NbjmrkdfxLghJlJxSk5N0U1ttiO2OAjs+hE6m z+cw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YTf8A3i5; 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-100827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100827-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d24-20020a63fd18000000b005dcc8a4590esi7663174pgh.680.2024.03.12.14.44.49 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Mar 2024 14:44:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-100827-linux.lists.archive=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=YTf8A3i5; 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-100827-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-100827-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6A093B20B04 for ; Tue, 12 Mar 2024 21:44:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 027A814535B; Tue, 12 Mar 2024 21:43:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YTf8A3i5" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (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 E66391448E4; Tue, 12 Mar 2024 21:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710279784; cv=none; b=IfD8OYTcgsgjhusz82PWWoRn8HGkT+C64ZO+awzbVibc3nrsk2PQ87Y0hBkfkaaR8e+3IE2Q7y4C6Vh2pYHJX68Rat9J74fUi5dKoatZFt2cxCHHHVHdQFXf91DhC+Dp4epvy3nR7EVUJJHXFwILZ/abjKBs1h3Hw+s0z8IOlhY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710279784; c=relaxed/simple; bh=GSbgnTJVBeQv/h9+bAESzpdDd8n73V8fZiggfLH9y9Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=I3v0M3qtKKDc5Ri1TvP5V45WYwV/HUzGmrCTpvBbRV6lPl4aGJC4tD3EocuRP6Py9GYcps7RSirDd2XWk2WkYUuHHIN4kY/BgWU54Angl9obKt2xJB/u/APxE8RWxCc1fsPyEUqOrfeeCHcDWqyAIfaNUy7FyTFBOihgS3U8L0s= 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=YTf8A3i5; arc=none smtp.client-ip=198.175.65.19 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=1710279783; x=1741815783; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=GSbgnTJVBeQv/h9+bAESzpdDd8n73V8fZiggfLH9y9Y=; b=YTf8A3i589IOru5fQXLpBqICtM2GiyUFzuEXrp7TmA4NfbXzgqWt5oXM rcuIwsssB+clwAgdoUW2aEdfs+C2BQno5InDD7jzycOAHYKWUsQA6UA/H gsmnUFhylPvWiDGXKCgTBUJx1xWODs5CbEiaVQ95Iv/o7OYlidprSC6XT vykePAJKtCWNL8g2wWLBjKL1MAaAkxT6IF2UbZ9c9858aUoWdz7Q+jZfo Eg/Dw1Oqzs6GOc3xofICc21X+wWSWitKz+ycIZZErVoYe/FKuF8C1pl4e Sjxn/ACBzoo/gzZ5HNJQv/EoDhDIYv8ezKQwdRflXXOBENBvRC+C1FOSk Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11011"; a="4884865" X-IronPort-AV: E=Sophos;i="6.07,119,1708416000"; d="scan'208";a="4884865" Received: from orviesa008.jf.intel.com ([10.64.159.148]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2024 14:42:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,119,1708416000"; d="scan'208";a="12280162" Received: from agluck-desk3.sc.intel.com ([172.25.222.105]) by orviesa008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Mar 2024 14:42:56 -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 , Drew Fustini , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v16 8/9] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Tue, 12 Mar 2024 14:42:46 -0700 Message-ID: <20240312214247.91772-9-tony.luck@intel.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240312214247.91772-1-tony.luck@intel.com> References: <20240312214247.91772-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. 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.44.0