Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp3135797rdb; Fri, 22 Sep 2023 21:43:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE5vE6Xef20PyWQdRRGb+FOmXemRV4I4nqk6Oge7M7lCtRcarqkq3GoI+NXme+Cz2h0NWxW X-Received: by 2002:a17:902:ce87:b0:1c1:ee23:bb75 with SMTP id f7-20020a170902ce8700b001c1ee23bb75mr1385465plg.1.1695444195401; Fri, 22 Sep 2023 21:43:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695444195; cv=none; d=google.com; s=arc-20160816; b=Uhg79iKvGRQEX7jbwAsmdsmo9yM1xC+lavYv9tRBBew9IyHoiHLhPSWsABqeRpbFHG Tkwc3qBPLo6iwt7hgbMmreTwS70Q2NQifMf8Pg3/N4XDPdVHxbtC0dW8SjpLKn0CAx9a W5Nc67JyKdmNczPA0w/uUQpdu6j3B6lbaQ20T+4szmJMh3A+nk1tVgvuTjC5GLCZy2vZ uj6G5pUlgegW9h7glm3uvWlFSFxdFkE2dufNE4lrMgaq53WhEntXxmI1g+gYJ61YxhT1 HP4ajYN5iUCtvdr1p74p2STQb4MjlTNsiZwcX3MPHPmqgOWuFiJe8t+nr2odZjqK8UMh 5nKw== 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=ex5jlUrXJC279gM4NXcAPdZYA8oQs9PsGGp+TAzN//Y=; fh=qtEk00d2+4XMfn63r4rr3njQyy4aQXo4MEaOJVONGlQ=; b=FZbCKtsFEHUCIMz+6/P4lTQ9/tuVERE0NxW4wZtGjCilXGaNUa+90/plC3tH16zKAR A0Uf3GXMoTU7zjyq4THQJTDEUTqS5xQoZov8TfL32/cFGBqUB525IUyv6UsAs+b7PRAP cS+8EZIOj5CO9JvOq10dxsHr0izgwQXbxx0yYuEX/mXA8k9tOBFTy+1d/aUSuqK/kQ4g aNCBSdby4SZj1jJ2DIv+Fq6UIGJEm75eB3NDtbHbPdNOTmffAHvuH/KclTAPk80q90AH 6rSLQfnBE1Dli5Y77JmCGBt7zqnmsd2oupCxO3ZcoDjHPDJbLfpVf3ggX2h8YJwweZ9g UIvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LH2gtsc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id j6-20020a170903024600b001bb0ff2b354si5392041plh.425.2023.09.22.21.43.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Sep 2023 21:43:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=LH2gtsc6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (Postfix) with ESMTP id 3CC2180658C8; Fri, 22 Sep 2023 01:49:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232356AbjIVItZ (ORCPT + 99 others); Fri, 22 Sep 2023 04:49:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbjIVItY (ORCPT ); Fri, 22 Sep 2023 04:49:24 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3109E114; Fri, 22 Sep 2023 01:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695372558; x=1726908558; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Zhq6Q9da5I32FTSH2enBZH43A5sWinpb8SOB3X2i5Oc=; b=LH2gtsc6jh7LrcmEltz8DaeO5d3ftdRWXLN30ifPNGuDp9f7tbR5NTjD 9vVrvfGI3fEvuXzgsyYEflWbP/8DFK/Q1NdHlW1E4DBQ6z/UzCa/5D6zn a6yzGUutmifSlcfUToOuBC8NBo7EwRS33ODlW4RVKrjusDhnoCfGiH5Hy lEy0HHKsrZ6zXLD+9x36AzP2agf1MqInywtl5Ms/PN/BaO4R5cVl/mc03 pChGTo0Ict8CaM4OaPppoeykPkbhD3VQMhZTijHPpsw932tJDkwvxfgv8 qGhSjMYZfUYx7KO0xCBFSQnFO7ksg39M3Om5kBGDw1mADlKWE0JZFF+eT g==; X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="383524505" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="383524505" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 01:49:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10840"; a="750769514" X-IronPort-AV: E=Sophos;i="6.03,167,1694761200"; d="scan'208";a="750769514" Received: from bmatwiej-mobl.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.8.2]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2023 01:49:14 -0700 From: Maciej Wieczor-Retman To: Fenghua Yu , Reinette Chatre , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Jonathan Corbet Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v2 3/4] Documentation/x86: Document resctrl's new sparse_masks Date: Fri, 22 Sep 2023 10:48:25 +0200 Message-ID: <308c92438288a45a12330af83aa0088a31f60343.1695371055.git.maciej.wieczor-retman@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Fri, 22 Sep 2023 01:49:24 -0700 (PDT) From: Fenghua Yu The documentation mentions that non-contiguous bit masks are not supported in Intel Cache Allocation Technology (CAT). Update the documentation on how to determine if sparse bit masks are allowed in L2 and L3 CAT. Mention the file with feature support information is located in the /sys/fs/resctrl/info/{resource}/ directories and enumerate what are the possible outputs on file read operation. Signed-off-by: Fenghua Yu Signed-off-by: Maciej Wieczor-Retman --- Changelog v2: - Change bitmap naming convention to bit mask. (Reinette) Documentation/arch/x86/resctrl.rst | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Documentation/arch/x86/resctrl.rst b/Documentation/arch/x86/resctrl.rst index cb05d90111b4..4c6421e2aa31 100644 --- a/Documentation/arch/x86/resctrl.rst +++ b/Documentation/arch/x86/resctrl.rst @@ -124,6 +124,13 @@ related to allocation: "P": Corresponding region is pseudo-locked. No sharing allowed. +"sparse_masks": + Indicates if non-contiguous 1s value in CBM is supported. + + "0": + Only contiguous 1s value in CBM is supported. + "1": + Non-contiguous 1s value in CBM is supported. Memory bandwidth(MB) subdirectory contains the following files with respect to allocation: @@ -445,12 +452,13 @@ For cache resources we describe the portion of the cache that is available for allocation using a bitmask. The maximum value of the mask is defined by each cpu model (and may be different for different cache levels). It is found using CPUID, but is also provided in the "info" directory of -the resctrl file system in "info/{resource}/cbm_mask". Intel hardware +the resctrl file system in "info/{resource}/cbm_mask". Some Intel hardware requires that these masks have all the '1' bits in a contiguous block. So 0x3, 0x6 and 0xC are legal 4-bit masks with two bits set, but 0x5, 0x9 -and 0xA are not. 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. +and 0xA are not. Check /sys/fs/resctrl/info/{resource}/sparse_masks +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. Memory bandwidth Allocation and monitoring ========================================== -- 2.42.0