Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2914527rdb; Mon, 4 Dec 2023 10:54:53 -0800 (PST) X-Google-Smtp-Source: AGHT+IEkxvnyIKLcAulLMywV1CVeP04Xq3Z8qyYGOquRt8Al+iO2Mb/itB2i8LhyGGq8pmWpYCko X-Received: by 2002:a05:6a21:3007:b0:18f:97c:5ba6 with SMTP id yd7-20020a056a21300700b0018f097c5ba6mr1465861pzb.116.1701716093407; Mon, 04 Dec 2023 10:54:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701716093; cv=none; d=google.com; s=arc-20160816; b=XLr8f5yOuFfXqM5PY6LtVXZJDut1Uafxz2PjYrNV2UpF8QMepPGMnnh1tWs+5h/Krf wKW/X/IbmEplwg1KhLZoITxX5/6v53Xq0BX6imQhbh86h6pENC3GWc539lIgpAFG1W+J U5tJAiTDQATH45rLQJcllbOWsDu57tgH0YkoZSEag8qkwdSSRoD2FU+n2HOEWLYza6BA 9EBIATmTLDh4iuLTvf7OF0MhTB+eu6eVDZ3YMRDIvjRbDywBWdK0foNhfQMO9zy2vEtR Sc4dN+ULhfW7UOc6DMpcvuvCe6FJG0+6Apvf0ah375sfd8sOJwcL82jzgcc+YmQZ0qxR cxFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=2aAFBMeF9xZFrSYClH7MijFLNR1tOtfH+BDDqalWWx8=; fh=Vn7xSirI6nqm5i0/AysSYQOSFcHB81/IRDfzPMkc31I=; b=brkEYhVi2baM84/ZfgnENeuqGw7ol9Geb6mr2L64QVbnsaTeAAeWub3/gCH9WYWI7h XdruoFVman9UOiKl8fRWtMFwpq+wlH8YfsYu8ZO6wYqzlIWB6nfP5o5WMzVQqlE42DXd WH7Duc9oRUC6s3YecJLFLWpT/L28Dz5AV6f00XwVUHxCJTXObDulwrB20GXvO8NvOHAY ZMaw+TqVraWvD0krhmXeEI8LHvQ+CEBjHfpi1/B55GAjqIftQQPO0JReCdChM8xY0AJO d4V0h8cantiXP8Bk+8zuQNb9httExgceS/kAxfNTIixUhyk+bqm1YOcYZtxEZ5UFKjbH g8Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nNqN6Fgy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id a193-20020a6390ca000000b005c1cc7273bcsi3953097pge.731.2023.12.04.10.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 10:54:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=nNqN6Fgy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 80231802BD55; Mon, 4 Dec 2023 10:54:49 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232992AbjLDSyg (ORCPT + 99 others); Mon, 4 Dec 2023 13:54:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231368AbjLDSyM (ORCPT ); Mon, 4 Dec 2023 13:54:12 -0500 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 67510182; Mon, 4 Dec 2023 10:54:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701716055; x=1733252055; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fZDidZslMkY7XjR1qX39lqLvrgEO82GII5KjdZw9iqc=; b=nNqN6FgyRwxsh3tYvion6wlixzsa/vAzO4w8gGH7PruojWSze9QSP4wE yazvSn4os55To/oDATCWw43M5IB2DFbIPVupbzaJFHiR8N9ZKxyr724xt kTxKnPo0ibdubi6yggTIDvMsj4vkXewAqOf5Ua832toNDVdvZkgPj9vNS gIj+RLzFi6RXACosJI3ZAXp7e46Kq/wQyR9fEXtSq41Elp4RrAgm0hB5T pD2b8OrItRNfvA3s7OtRAiMwRAuxs7tEVGHLWI2ezZETF51skLNoHiqxt B2XFA6RxMwnAQhRPD68NTEtHoemasZS5UnO9VXP6Nxa/WCTRcZuC2Rh1R A==; X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="838543" X-IronPort-AV: E=Sophos;i="6.04,250,1695711600"; d="scan'208";a="838543" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 10:54:09 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10914"; a="836687212" X-IronPort-AV: E=Sophos;i="6.04,250,1695711600"; d="scan'208";a="836687212" Received: from agluck-desk3.sc.intel.com ([172.25.222.74]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Dec 2023 10:54:08 -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 , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, patches@lists.linux.dev, Tony Luck , Shaopeng Tan Subject: [PATCH v13 8/8] x86/resctrl: Update documentation with Sub-NUMA cluster changes Date: Mon, 4 Dec 2023 10:53:57 -0800 Message-ID: <20231204185357.120501-9-tony.luck@intel.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231204185357.120501-1-tony.luck@intel.com> References: <20231130003418.89964-1-tony.luck@intel.com> <20231204185357.120501-1-tony.luck@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 10:54:49 -0800 (PST) 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 Tested-by: Shaopeng Tan Reviewed-by: Peter Newman Reviewed-by: Reinette Chatre Reviewed-by: Shaopeng Tan --- 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.41.0