From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 577A336C0C5 for ; Tue, 17 Mar 2026 11:13:26 +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=1773746007; cv=none; b=Rc9A48oBaa+hq6JncMqUP+vn57zhpW0bkx1DtzXReaKOsnyIzl1WDydlG0xvf5ZXyNx3229IGZ15jWI2NuxbvUSAWZoBvBh94F8v4om81Jq0oMMBIji5y+6k1m2Mygp2N5aT8WLnPjAuW5BN6srEIe6ZzCsMwp+vowXKSHkJ20k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773746007; c=relaxed/simple; bh=/IYiKMEv4DGsyhtNkU8ezXu9PYMCZm343XXqjNvROCs=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=LggEGikszZQuPf+cccNp05eBUGFn0PDOGHNTYCbDW99idFz+5J5Luy/DBKPkQ1+6+CJPZfCyS4tZ3Xehle65X9+i1/cQPhymxU/KlAwXd2vfPeYss2Da0djC5zg+MK6CqRR2Ktgah7LTHUQZ33x6oDF4ijJ2Mcu0LK2siDOZxjo= 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 B18A616F2; Tue, 17 Mar 2026 04:13:19 -0700 (PDT) Received: from [10.1.196.46] (e134344.arm.com [10.1.196.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 3F17B3F778; Tue, 17 Mar 2026 04:13:24 -0700 (PDT) Message-ID: Date: Tue, 17 Mar 2026 11:13:23 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Thunderbird Daily Subject: Re: [PATCH v2 4/6] fs/resctrl: Disallow the software controller when mbm counters are assignable To: Reinette Chatre , linux-kernel@vger.kernel.org Cc: tony.luck@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, fenghuay@nvidia.com, tan.shaopeng@fujitsu.com References: <20260313174524.3482767-1-ben.horgan@arm.com> <20260313174524.3482767-5-ben.horgan@arm.com> <43a47ac0-5d49-47da-9740-9789df9bda96@intel.com> Content-Language: en-US From: Ben Horgan In-Reply-To: <43a47ac0-5d49-47da-9740-9789df9bda96@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi Reinette, On 3/16/26 21:35, Reinette Chatre wrote: > Hi Ben, > > On 3/13/26 10:45 AM, Ben Horgan wrote: >> The software controller requires that there are free running mbm counters > > How is "free running" defined? I mean that for each control group (and it's associated monitor groups) there are dedicated MBM counters which are always present and always counting. So, mon_event_count() always provides a value representative of the traffic for that control group. > > (sidenote: please use upper case for acronyms throughout: mbm -> MBM) Ack > >> 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 > > I am not able to parse this second sentence. "to the introduction" -> "to > the introduction of"? What does "this" refer to? The 'this' was referring to the first sentence, that you need dedicated counters. > >> 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 > > It is not clear to me that software controller depends on counters not being > assignable. Is the problem not instead that the current implementation does not > support this since it allows the event used by software controller to not have a > counter assigned? So, instead of adding support for software controller by ensuring > that the event used by software controller has a counter assigned, this patch opts > for the simpler disabling of software controller when assignable counters are in use? Yes, they are not fundamentally incompatible but it would require some changes to the resctrl interface. Unless there are sufficient counters to have one per monitor group it will always be the case that creating more groups will lead to missing a counter for the software controller on one of the control groups. As I understand it, resctrl doesn't have a way to indicate that you only get a control on certain control groups. For MPAM it is possible to have counters that only match on PARTID and ignore PMG which could reduce the counters needed to support the software controller. However, one complication is that the (ignore PMG) counter doesn't match the count for the control group if it has monitor groups with unassigned counters. Thanks, Ben > >> requests the software controller, the mba_MBps option, and the mbm counters >> are assignable. > > Reinette >