From nobody Sat Apr 11 12:22:04 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 36B613CF675 for ; Fri, 13 Mar 2026 17:45:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773423950; cv=none; b=dDRZj/h2U3HGNKWeh8nQxwJmMlMMWPng1hqDqJjHlKVj60RqRRpaW3yuBTlJfceVgfUsfJi+SGmCYCScG8UU05BoAUdqtDfG2XOT2+vdjS8Hhx90/LDCyTD0iL5NAVQiCCgx6nQZt5m8N7e2Oser/KbQUPhG/nlxYR8zfwIud+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773423950; c=relaxed/simple; bh=BpFhy3nmQaddqrQYLKcAJrB640tbX9XYLKUwwA6Pwms=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ppbPLMoh08HfINf89lj/ci31JaJHPAJN21hXa4OrKQpM573A8MpSS4M5l6Czhd8rFzR+37sIMehbgt8Hoz9KeAeQWR66fxg4NpFT1OnIO/d3CLxRoizSNCqmMhapit8A5LIQWKTDLttgEuhoVywt9d6LxqEXDPEKt6xt1RkYY54= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 704C92308; Fri, 13 Mar 2026 10:45:39 -0700 (PDT) Received: from e134344.cambridge.arm.com (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 792DB3F694; Fri, 13 Mar 2026 10:45:43 -0700 (PDT) From: Ben Horgan To: linux-kernel@vger.kernel.org Cc: tony.luck@intel.com, reinette.chatre@intel.com, Dave.Martin@arm.com, james.morse@arm.com, babu.moger@amd.com, tglx@kernel.org, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com, ben.horgan@arm.com, fenghuay@nvidia.com, tan.shaopeng@fujitsu.com Subject: [PATCH v2 4/6] fs/resctrl: Disallow the software controller when mbm counters are assignable Date: Fri, 13 Mar 2026 17:45:22 +0000 Message-ID: <20260313174524.3482767-5-ben.horgan@arm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260313174524.3482767-1-ben.horgan@arm.com> References: <20260313174524.3482767-1-ben.horgan@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The software controller requires that there are free running mbm counters for each control group in order to provide the feedback necessary to control the memory bandwidth allocation for that control group. Previous to the introduction counter assignment support (ABMC) resctrl required this in order to advertise support for mbm but now if the mbm counters are assignable then this can't be guaranteed. Currently, only AMD systems support counter assignment but the MBA is non linear and so the software controller is never supported anyway. For MPAM systems the MBA is linear and so the dependency on counters not being assignable needs to made explicit. Hence, fail the mount if the user requests the software controller, the mba_MBps option, and the mbm counters are assignable. Signed-off-by: Ben Horgan --- fs/resctrl/rdtgroup.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c index 2f0a509b313a..21e6ca71e6e7 100644 --- a/fs/resctrl/rdtgroup.c +++ b/fs/resctrl/rdtgroup.c @@ -2535,7 +2535,8 @@ static bool supports_mba_mbps(void) =20 return (resctrl_is_mbm_enabled() && r->alloc_capable && is_mba_linear() && - r->ctrl_scope =3D=3D rmbm->mon_scope); + r->ctrl_scope =3D=3D rmbm->mon_scope && + !rmbm->mon.mbm_cntr_assignable); } =20 /* @@ -2950,7 +2951,7 @@ static int rdt_parse_param(struct fs_context *fc, str= uct fs_parameter *param) ctx->enable_cdpl2 =3D true; return 0; case Opt_mba_mbps: - msg =3D "mba_MBps requires MBM and linear scale MBA at L3 scope"; + msg =3D "mba_MBps requires dedicated MBM counters and linear scale MBA a= t L3 scope"; if (!supports_mba_mbps()) return invalfc(fc, msg); ctx->enable_mba_mbps =3D true; --=20 2.43.0