Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp38796rdg; Tue, 10 Oct 2023 03:43:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGi0NJegUXCWx/bV2xrnzT2E1s4kecq8/FCzJu1HG8LFkOoIFnCLM026nt+iUOZqisuOH1x X-Received: by 2002:a05:6a21:3381:b0:134:2b31:e2a9 with SMTP id yy1-20020a056a21338100b001342b31e2a9mr18969921pzb.0.1696934632096; Tue, 10 Oct 2023 03:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696934632; cv=none; d=google.com; s=arc-20160816; b=Tj8dJ9WJv8tfpoCGum0clBzVBbszg0ZOt6hY8k68SazMy3IMkAWVTHECoKd9gcX86m eRzKTb5CbXNM3DOIiGZxRNwFJ+p/4IomsHkQ8eL6YV17a6PQvGBQhDRVyeEwyYlxs4lZ +0rfZh29GzocWvsqJuGOIupzqZj/b9bo/7Ffc7NzkTd4RbsHUjc09wTvOrFcpDSB6OmT V35rfPxOp9OGYjG08UN6bcP2O+b837WTj3W6Ue5aAAtGHBSquhdsMoiI/rzNNDhk0g4D zZVMb3yrDlR5TJnabCO2RfgTzqnQOKRfAEcsDej1c0zEjFPFY3sfqGCwAtaiZQqtLK5K Nd1Q== 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=E9Jw4u3VE15cSmpMg+4UlDq4+E2iaERjxmcuW7Ekojc=; fh=WKMr0G+Rv+vBWEBH1uPAb+3lIio4rSFcNjY9Sggw1bo=; b=O7IWkDDYCtrx6YZhqmZVDAi4f0+9/AOShuTlwa4UPbIksZJ7J1cgCQlkCxQgQiGScW YxftRpyp7L3azCOihr1DCJDvNPNUf5Ix8ZIhiAONI/C35I6+t4IXFYi1z3Z817QfIkxq NOX8u3Hi85hlVVYJGWE/AqbFjpJRQhlCE5NDBEvr4A0SuKXuam38pX1g3h573ccWyufG fSe/M4OPkvqVwB0bIBu/a/BFcQ68Xp57iuF7iVvRs/DwLi7QhR4qgiGzX0R+a+na1vkm qnVIYNiXL3ERWY3lAfo5aIpIW0ACXeHI+PL+le4SyD28KX2StOhusR1LZmFwIZVko02w Lbrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HdXnT4ba; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id j7-20020a170902690700b001b3d6c68bd1si10966962plk.643.2023.10.10.03.43.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Oct 2023 03:43:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HdXnT4ba; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id AF829801E6B4; Tue, 10 Oct 2023 03:43:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231253AbjJJKnk (ORCPT + 99 others); Tue, 10 Oct 2023 06:43:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49704 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231250AbjJJKni (ORCPT ); Tue, 10 Oct 2023 06:43:38 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6FB8B4; Tue, 10 Oct 2023 03:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696934615; x=1728470615; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=iHOekVDgtaNocncHM8JY3mpFGLJsRdlpKILUbEllNtY=; b=HdXnT4baQcH1XHBvDofw7R5yMCOSMo4J1NMKwPcOI+erdBiDmhqKelZk UZM1Fs2YTwt6TV0eerOv+eF4qxWYC5GV7xHYhuI3ovB/mDFtyy6+gLs1J 21AbsRA/06sHhfVl4yOuoqYofedzo3WF7tj5VYo3T/pqH99Mm4l8seBp4 oYc7izTag4jjKulDsXOttoEldeN/Ax1XsRCudlfNg3YpLvgulQwn4d3Ze uLTJ+fjQ5AvAl3ImONW81Btp8mMFiwkZEUZMOr4bu5tREUQ19VQqVrvCK 42GRCBUyUdVVIzRs3EOCLmyH8vdg8GVjaGOc6pzraojDB2bkMjBkKyxPg A==; X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="374703550" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="374703550" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 03:43:35 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10858"; a="747033037" X-IronPort-AV: E=Sophos;i="6.03,212,1694761200"; d="scan'208";a="747033037" Received: from asalaman-mobl.ger.corp.intel.com (HELO wieczorr-mobl1.intel.com) ([10.213.16.145]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2023 03:43:29 -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: ilpo.jarvinen@linux.intel.com, Peter Newman , Babu Moger , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: [PATCH v5 4/4] Documentation/x86: Document resctrl's new sparse_masks Date: Tue, 10 Oct 2023 12:42:39 +0200 Message-ID: <3e9610997164f648e15c5c2e90d4944ce36504fe.1696934091.git.maciej.wieczor-retman@intel.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 10 Oct 2023 03:43:49 -0700 (PDT) X-Spam-Level: ** 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. Signed-off-by: Fenghua Yu Signed-off-by: Maciej Wieczor-Retman Tested-by: Peter Newman Reviewed-by: Ilpo Järvinen Reviewed-by: Peter Newman Reviewed-by: Reinette Chatre Reviewed-by: Babu Moger --- Changelog v5: - Remove last patch message paragraph. (Babu) - Add Babu's reviewed-by tag. Changelog v4: - Add Ilpo's reviewed-by tag. - Add Reinette's reviewed-by tag. Changelog v3: - Add Peter's tested-by and reviewed-by tags. 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