From nobody Fri Dec 19 10:41:19 2025 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 518861CB31A; Tue, 2 Jul 2024 19:24:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719948255; cv=none; b=Arzyr6+qr70pYqMSpRnq8Eo+zjT9wuUIeYAWE51hLxC6DEZFOGadmrozC9naM5TSmau6Or+6RVxinoRukAIBAuxb/55X0pOIyQiV3dyk4HI4hTONHS3+V5JyEJeJ+CBm647BvS/s8WM0WZNdI5hOWNdF0z4IMV8Hs1qqtqy80Os= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719948255; c=relaxed/simple; bh=iTAuuTvyWuTjH6eASXO9WmFqbU2PsWFGuxwWXTTeWg8=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=CyEuzUhfMmbOL2AVBHCGAifZg3XOXS8F8EAKWp2nRXmU1CMaQfnMkHClKKBhUyrWcVvsrjtzLZhiu+YifWNmwKPmKekBdgAgTX8UwKewQxRav3iLGnb87T4Bl5gg/xjzsRpiMlnyIoX4QpGhemof+mXQzwP54EcwZloMDlh5BjM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=2NZBcUJD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ca0w0gz3; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2NZBcUJD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ca0w0gz3" Date: Tue, 02 Jul 2024 19:24:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1719948251; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f179/Njrl3TAgSfLu1Wgq53NxHoZBcCxTm4JG5OWHfo=; b=2NZBcUJDuZCmKYXLW39JuyBIgcAxRPOQZFcNnrCESo+4UHldHMWHEgPWIXJI7aKrll5KAI rmHtHP/7t5Fp/CRSpQT8rKXge8qAUlE1pneUQERuQNqmrHU3XlHUuSGp4NyNgcCkMG00so bJReRLNpwheBrsJteRGZFRLmH6L4ZpRsL33WgOMpYP7TAbklEG0V4ErdBgBco5U2NUQ1gM NCPCJWRApSMwS0qx2t7e4M2DSyO2unF8HimloUpqq0iy22+RPPUwEAgiO+qAIMtRCa47vH TIWE10SGYiJHzSO+G/RyLK7DbLJ3f++DLVoffV4COthc6fuELQY05A8on/i1pQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1719948251; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f179/Njrl3TAgSfLu1Wgq53NxHoZBcCxTm4JG5OWHfo=; b=ca0w0gz3wD1FPVZRylQsFTVShM0mlCRUAkPR9zGHHR1LGxgAZYeJsyOC59Jp/rGS9h+DSM hSX1DF5i8/Lq1mDg== From: "tip-bot2 for Tony Luck" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cache] x86/resctrl: Update documentation with Sub-NUMA cluster changes Cc: Tony Luck , "Borislav Petkov (AMD)" , Reinette Chatre , Babu Moger , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240628215619.76401-20-tony.luck@intel.com> References: <20240628215619.76401-20-tony.luck@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171994825095.2215.6815730382821505563.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cache branch of tip: Commit-ID: ea34999f41873c96ac89e861e5fdfc7d0403f9e3 Gitweb: https://git.kernel.org/tip/ea34999f41873c96ac89e861e5fdfc7d0= 403f9e3 Author: Tony Luck AuthorDate: Fri, 28 Jun 2024 14:56:19 -07:00 Committer: Borislav Petkov (AMD) CommitterDate: Tue, 02 Jul 2024 20:03:19 +02:00 x86/resctrl: Update documentation with Sub-NUMA cluster changes With Sub-NUMA Cluster (SNC) mode enabled, the scope of monitoring resources is per-NODE instead of per-L3 cache. Backwards compatibility is maintained 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 Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Tested-by: Babu Moger Link: https://lore.kernel.org/r/20240628215619.76401-20-tony.luck@intel.com --- Documentation/arch/x86/resctrl.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/re= sctrl.rst index 627e238..a824aff 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 co= ntain: 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. =20 "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 w= ith 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. =20 +Notes on Sub-NUMA Cluster mode +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D +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 only represents 5MB. + Memory bandwidth Allocation and monitoring =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D