[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2ef49c6c-9de8-4aca-9e78-726b8665cdeb@arm.com>
Date: Fri, 16 Jan 2026 11:04:24 +0000
From: Ben Horgan <ben.horgan@....com>
To: "Shaopeng Tan (Fujitsu)" <tan.shaopeng@...itsu.com>
Cc: "amitsinght@...vell.com" <amitsinght@...vell.com>,
"baisheng.gao@...soc.com" <baisheng.gao@...soc.com>,
"baolin.wang@...ux.alibaba.com" <baolin.wang@...ux.alibaba.com>,
"carl@...amperecomputing.com" <carl@...amperecomputing.com>,
"dave.martin@....com" <dave.martin@....com>,
"david@...nel.org" <david@...nel.org>,
"dfustini@...libre.com" <dfustini@...libre.com>,
"fenghuay@...dia.com" <fenghuay@...dia.com>,
"gshan@...hat.com" <gshan@...hat.com>,
"james.morse@....com" <james.morse@....com>,
"jonathan.cameron@...wei.com" <jonathan.cameron@...wei.com>,
"kobak@...dia.com" <kobak@...dia.com>,
"lcherian@...vell.com" <lcherian@...vell.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"peternewman@...gle.com" <peternewman@...gle.com>,
"punit.agrawal@....qualcomm.com" <punit.agrawal@....qualcomm.com>,
"quic_jiles@...cinc.com" <quic_jiles@...cinc.com>,
"reinette.chatre@...el.com" <reinette.chatre@...el.com>,
"rohit.mathew@....com" <rohit.mathew@....com>,
"scott@...amperecomputing.com" <scott@...amperecomputing.com>,
"sdonthineni@...dia.com" <sdonthineni@...dia.com>,
"xhao@...ux.alibaba.com" <xhao@...ux.alibaba.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"will@...nel.org" <will@...nel.org>, "corbet@....net" <corbet@....net>,
"maz@...nel.org" <maz@...nel.org>, "oupton@...nel.org" <oupton@...nel.org>,
"joey.gouly@....com" <joey.gouly@....com>,
"suzuki.poulose@....com" <suzuki.poulose@....com>,
"kvmarm@...ts.linux.dev" <kvmarm@...ts.linux.dev>
Subject: Re: [PATCH v3 31/47] arm_mpam: resctrl: Pre-allocate assignable
monitors
Hi Shaopeng,
On 1/16/26 10:34, Shaopeng Tan (Fujitsu) wrote:
> Hello Ben,
>
>> From: James Morse <james.morse@....com>
>>
>> When there are not enough monitors, MPAM is able to emulate ABMC by making
>> a smaller number of monitors assignable. These monitors still need to be
>> allocated from the driver, and mapped to whichever control/monitor group
>> resctrl wants to use them with.
>>
>> Add a second array to hold the monitor values indexed by resctrl's cntr_id.
>>
>> When CDP is in use, two monitors are needed so the available number of
>> counters halves. Platforms with one monitor will have zero monitors when
>> CDP is in use.
>>
>> Reviewed-by: Jonathan Cameron <jonathan.cameron@...wei.com>
>> Signed-off-by: James Morse <james.morse@....com>
>> Signed-off-by: Ben Horgan <ben.horgan@....com>
[...]
>> +bool resctrl_arch_mbm_cntr_assign_enabled(struct rdt_resource *r)
>> +{
>> + if (r != &mpam_resctrl_controls[RDT_RESOURCE_L3].resctrl_res)
>> + return false;
>> +
>> + return mpam_resctrl_abmc_enabled();
>> +}
>> +
>> +int resctrl_arch_mbm_cntr_assign_set(struct rdt_resource *r, bool enable)
>> +{
>> + return -EINVAL;
>> +}
>
> $ echo "default" | sudo tee /sys/fs/resctrl/info/L3_MON/mbm_assign_mode
> default
> tee: /sys/fs/resctrl/info/L3_MON/mbm_assign_mode:Invalid argument
> "return -EOPNOTSUPP;" might be better.
I'll keep this as -EINVAL in the case when 'enable' matches the current mode
and change it to return 0 when there is nothing to change. This will match the
behaviour once this is handled in resctrl. See the outcome of the discussion on
this resctrl patch [1] Note, that I haven't yet updated the patch to match the
discussion. Any objection?
[1] https://lore.kernel.org/lkml/bf8bb682-6a4d-4f39-916c-952719fcf48d@arm.com/
Thanks,
Ben
Powered by blists - more mailing lists