Received: by 2002:ab2:715a:0:b0:1fd:c064:50c with SMTP id l26csp36084lqm; Mon, 10 Jun 2024 11:52:24 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW/kZUb0iKRbZ7saE4bbIsQvqUiUBpaLPwvvASTvpJ6PaJB2DfeoNTpD2RC6GEw0OCplojo8ICmbuPOgQ800C/vmpgpNtzwm+j664mlLg== X-Google-Smtp-Source: AGHT+IEM52TsEkxyXITaSZoKxtMmF+1byD41E7MGVWIsBLqXVJ5i3Kyt5RiQ43p7gZ9i3Aj/EtON X-Received: by 2002:a17:90a:c68a:b0:2c2:12d:fa01 with SMTP id 98e67ed59e1d1-2c32b4a138amr677299a91.11.1718045544022; Mon, 10 Jun 2024 11:52:24 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718045544; cv=pass; d=google.com; s=arc-20160816; b=1LqH/8dk+B+GsNH6NFEIhXSTfa+zGeNqyP8tFnQEZvU5Qoxw/iMFV+jTnbsm67gP2q j8tytSzY6S1fv2uMsX+CqosUPRCM5UE1GlqJbJIsElluFJ0b3qNQVZtqGLr0zFNQSvMF oKJxu8gGHTTFOHnaZn5LPCJV2TdKmnSD012WF6YgabrPm07m3YTX0cznRWYQ/2gxVGVl fB0Bpv3+oPy1WnHGqH/jCVkMqoGOmNFCq3hOoiM8lZajmxodQHJG1NZXXZeovX6oCPvT E2Y22d7AkRbm7CAqf+aXavGY6SLeGGk0T1f9zkYb1QKV2cru19E03Ug8olt+QJyLi9Jd DJzA== 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=23ulTBd3gkoHdS/l0iWwgZlfo4Hc7dfowKJlaaH4Upc=; fh=qTx768JYq6oxdX3jfjUzjJGF83d0IKGtQzHdow3lchk=; b=fHdXMlS51ySHYxR5CBnYnP2Ht564xIGJiqaBV6z67+abQPi7ZzlFW7GYtdJ/RUUKYS sxn9xt5w9ApNuPnY491cImdIsVY85WZsLkPHlVUuA27pmCBq7bUm9D0X8BfABxQm90FR qUoaUks/uKFlixRcr45/4Gl9WZndR56w0lMh1g6BD0bASBvcxXCntCTlo0Q6VZYbNi2g uXJuTRIIu32bIfATF1n2A+gr/3iFQWJhQ5MfJ10W0rXZOV25+eF7MG5+71qDetXVYfLq Ya092Oc9d5wyiXCXyMm3VmzMG7iKpk8ICzCoMwuRF4NmbHUEuSEEAzQd9Xwd4G+mE2Sv iZpQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TRx2lRqa; 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-208757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208757-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2d0e79696si5381838a91.80.2024.06.10.11.52.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Jun 2024 11:52:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-208757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TRx2lRqa; 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-208757-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-208757-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 C35DBB24E4F for ; Mon, 10 Jun 2024 18:39:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9447A153BFA; Mon, 10 Jun 2024 18:35:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="TRx2lRqa" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) (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 7695C15359B for ; Mon, 10 Jun 2024 18:35:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718044553; cv=none; b=JQzJAqo7NzIKBW3eyi0pwtxmPN4Y1yYPPnqlTVPiWnhuaUv+dhT3TFYpbMm9d3+KzGqmYZnbaGQVISDCfM/wMLDZPoMfOLD3JpIxRoFthAZsgTI+S3c481RkfKEBtDPrFzTXGnI9M+udca8BGN4CzfWmWsFrBQyI7QvVOUWixXc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718044553; c=relaxed/simple; bh=QWAT3iQia8dY5B2qRCiwXB7JLqWgNfQIUidwZFZo5vg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DsdFX+ZbY1XxxZzPd2mCkfW+klyv6/cMcH70P6ErMrP38Kj0SmHRD09WQGyT9TnAfvnZicCkDEfwK0NjSCTcSxl1mQQccGaUy2R0+GY205X+3wyQ0YA2z5bXLNMZP0JHw9M0Psq4XBS9QLYjKge/SgR8T3CjzjswUTZM55QfIyY= 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=TRx2lRqa; arc=none smtp.client-ip=192.198.163.16 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=1718044551; x=1749580551; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=QWAT3iQia8dY5B2qRCiwXB7JLqWgNfQIUidwZFZo5vg=; b=TRx2lRqapYPQFEk7wQMIhO9cnZITJlN6CWbuCK5qR3+LOIyEEee7kosi bAAupfXif6vp/YYauuGTSrTGKjeUvJRoZBjwRUpu6pqD9hoi6iyut/PXN 2e90BfObCXtU7J6wBs6Gsu8VB9+4L+f6C9XtzBnvQs9yNus584cTtZO+B objdEiZ6k9T0S1588+R+auVzKcia3piJVBSa1jw9kyH6mKHpLK+GQPKBQ Tk1q9JvG1Txc3KvPWL07QMyHDmpUS9kYJOaoGk5/t1/qkWWcqLeaCjdo1 uK6chjnhkEaMvqFZFv6mwdm0rH3I56/9ybP77YnMlw8pyIuGIfD2zepCh Q==; X-CSE-ConnectionGUID: DLDSD11yRRizfjcug1V+fw== X-CSE-MsgGUID: Yx84/uEqRXq+1XiUbh8FgA== X-IronPort-AV: E=McAfee;i="6600,9927,11099"; a="12004900" X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="12004900" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 11:35:39 -0700 X-CSE-ConnectionGUID: JC+rwXPOQB+LVVj+PMgj/Q== X-CSE-MsgGUID: PXD/OZwfRvutt+FVvFhSzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,227,1712646000"; d="scan'208";a="43576607" Received: from agluck-desk3.sc.intel.com ([172.25.222.70]) by fmviesa005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Jun 2024 11:35:39 -0700 From: Tony Luck To: Fenghua Yu , Reinette Chatre , Maciej Wieczor-Retman , Peter Newman , James Morse , Babu Moger , Drew Fustini , Dave Martin Cc: x86@kernel.org, linux-kernel@vger.kernel.org, patches@lists.linux.dev, Tony Luck Subject: [PATCH v20 18/18] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Mon, 10 Jun 2024 11:35:28 -0700 Message-ID: <20240610183528.349198-19-tony.luck@intel.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240610183528.349198-1-tony.luck@intel.com> References: <20240610183528.349198-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 (SNC) mode enabled the scope of monitoring resources is per-NODE instead of per-L3 cache. Backwards compatibility is mainatined by providing files in the mon_L3_XX directories that sum event counts for all SNC nodes sharing an L3 cache. New files provide per-SNC node event counts. 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 | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst index 627e23869bca..6695b7bc698d 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -375,6 +375,10 @@ When monitoring is enabled all MON groups will also contain: all tasks in the group. In CTRL_MON groups these files provide the sum for all tasks in the CTRL_MON group and all tasks in MON groups. Please see example section for more details on usage. + On systems with Sub-NUMA Cluster (SNC) enabled there are extra + directories for each node (located within the "mon_L3_XX" directory + for the L3 cache they occupy). These are named "mon_sub_L3_YY" + where "YY" is the node number. "mon_hw_id": Available only with debug option. The identifier used by hardware @@ -484,6 +488,29 @@ 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. + +The top-level monitoring files in each "mon_L3_XX" directory provide +the sum of data across all SNC nodes sharing an L3 cache instance. +Users who bind tasks to the CPUs of a specific Sub-NUMA node can read +the "llc_occupancy", "mbm_total_bytes", and "mbm_local_bytes" in the +"mon_sub_L3_YY" directories to get node local data. + +Memory bandwidth allocation is still performed at the L3 cache +level. I.e. throttling controls are applied to all SNC nodes. + +L3 cache allocation bitmaps also apply to all SNC nodes. But note that +the amount of L3 cache represented by each bit is divided by the number +of SNC nodes per L3 cache. E.g. with a 100MB cache on a system with 10-bit +allocation masks each bit normally represents 10MB. With SNC mode enabled +with two SNC nodes per L3 cache, each bit would only represent 5MB. + Memory bandwidth Allocation and monitoring ========================================== -- 2.45.0