From: Ben Horgan <ben.horgan@arm.com>
To: "Shaopeng Tan (Fujitsu)" <tan.shaopeng@fujitsu.com>
Cc: "amitsinght@marvell.com" <amitsinght@marvell.com>,
"baisheng.gao@unisoc.com" <baisheng.gao@unisoc.com>,
"baolin.wang@linux.alibaba.com" <baolin.wang@linux.alibaba.com>,
"carl@os.amperecomputing.com" <carl@os.amperecomputing.com>,
"dave.martin@arm.com" <dave.martin@arm.com>,
"david@kernel.org" <david@kernel.org>,
"dfustini@baylibre.com" <dfustini@baylibre.com>,
"fenghuay@nvidia.com" <fenghuay@nvidia.com>,
"gshan@redhat.com" <gshan@redhat.com>,
"james.morse@arm.com" <james.morse@arm.com>,
"jonathan.cameron@huawei.com" <jonathan.cameron@huawei.com>,
"kobak@nvidia.com" <kobak@nvidia.com>,
"lcherian@marvell.com" <lcherian@marvell.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"peternewman@google.com" <peternewman@google.com>,
"punit.agrawal@oss.qualcomm.com" <punit.agrawal@oss.qualcomm.com>,
"quic_jiles@quicinc.com" <quic_jiles@quicinc.com>,
"reinette.chatre@intel.com" <reinette.chatre@intel.com>,
"rohit.mathew@arm.com" <rohit.mathew@arm.com>,
"scott@os.amperecomputing.com" <scott@os.amperecomputing.com>,
"sdonthineni@nvidia.com" <sdonthineni@nvidia.com>,
"xhao@linux.alibaba.com" <xhao@linux.alibaba.com>,
"zengheng4@huawei.com" <zengheng4@huawei.com>
Subject: Re: [RFC PATCH v2 2/5] arm_mpam: resctrl: Pre-allocate assignable monitors
Date: Fri, 27 Mar 2026 09:54:12 +0000 [thread overview]
Message-ID: <96b5d9fb-6e94-405d-a395-d7e441387959@arm.com> (raw)
In-Reply-To: <TY4PR01MB16930BFFB7CE7FEB56CA693098B57A@TY4PR01MB16930.jpnprd01.prod.outlook.com>
Hi Shaopeng,
On 3/27/26 03:00, Shaopeng Tan (Fujitsu) wrote:
> Hello Ben,
>
>> MPAM is able to emulate ABMC, i.e. mbm_event mode, by making memory
>> bandwidth monitors assignable. Rather than supporting the 'default'
>> mbm_assign_mode always use 'mbm_event'mode even if there are sufficient
>> memory bandwidth monitors. The per monitor event configuration is only
>> provided by resctrl when in 'mbm_event' mode and so only allowing
>> 'mbm_event' mode will make it easier to support per-monitor event
>> configuration for MPAM. For the moment, the only event supported is
>> mbm_total_event with no bandwidth type configuration. The 'mbm_assign_mode'
>> file will still show 'default' when there is no support for memory
>> bandwidth monitoring.
>>
>> The monitors 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.
>>
>> Co-developed-by: James Morse <james.morse@arm.com>
>> Signed-off-by: James Morse <james.morse@arm.com>
>> Signed-off-by: Ben Horgan <ben.horgan@arm.com>
>>
>> +/*
>> + * This must run after all event counters have been picked so that any free
>> + * running counters have already been allocated.
>> + */
>> +static int mpam_resctrl_monitor_init_abmc(struct mpam_resctrl_mon *mon)
>> +{
>> + struct mpam_resctrl_res *res = &mpam_resctrl_controls[RDT_RESOURCE_L3];
>> + struct rdt_resource *l3 = &res->resctrl_res;
>> + struct mpam_class *class = mon->class;
>> + u16 num_mbwu_mon;
>> + size_t num_rmid = resctrl_arch_system_num_rmid_idx();
>> +
>> + if (mon->mbwu_idx_to_mon) {
>> + pr_debug("monitors free running\n");
>> + return 0;
>> + }
>
> ABMC is not supported under this condition.
> Why does this condition conclude that there are enough monitors(monitors freee running)?
This is just a mistake. I missed removing this condition when support for using mbwu in
"free running"/non-AMBC mode was removed.
Thanks,
Ben
>
> Best regards,
> Shaopeng TAN
>
next prev parent reply other threads:[~2026-03-27 9:54 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-19 16:55 [RFC PATCH v2 0/5] arm_mpam: resctrl: Counter Assignment (ABMC) Ben Horgan
2026-03-19 16:55 ` [RFC PATCH v2 1/5] arm_mpam: resctrl: Pick classes for use as mbm counters Ben Horgan
2026-03-27 2:53 ` Shaopeng Tan (Fujitsu)
2026-03-27 9:50 ` Ben Horgan
2026-03-19 16:55 ` [RFC PATCH v2 2/5] arm_mpam: resctrl: Pre-allocate assignable monitors Ben Horgan
2026-03-27 3:00 ` Shaopeng Tan (Fujitsu)
2026-03-27 9:54 ` Ben Horgan [this message]
2026-03-19 16:55 ` [RFC PATCH v2 3/5] arm_mpam: resctrl: Add resctrl_arch_config_cntr() for ABMC use Ben Horgan
2026-03-19 16:55 ` [RFC PATCH v2 4/5] arm_mpam: resctrl: Add resctrl_arch_cntr_read() & resctrl_arch_reset_cntr() Ben Horgan
2026-03-19 16:55 ` [RFC PATCH v2 5/5] arm64: mpam: Add memory bandwidth usage (MBWU) documentation Ben Horgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=96b5d9fb-6e94-405d-a395-d7e441387959@arm.com \
--to=ben.horgan@arm.com \
--cc=amitsinght@marvell.com \
--cc=baisheng.gao@unisoc.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=carl@os.amperecomputing.com \
--cc=dave.martin@arm.com \
--cc=david@kernel.org \
--cc=dfustini@baylibre.com \
--cc=fenghuay@nvidia.com \
--cc=gshan@redhat.com \
--cc=james.morse@arm.com \
--cc=jonathan.cameron@huawei.com \
--cc=kobak@nvidia.com \
--cc=lcherian@marvell.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peternewman@google.com \
--cc=punit.agrawal@oss.qualcomm.com \
--cc=quic_jiles@quicinc.com \
--cc=reinette.chatre@intel.com \
--cc=rohit.mathew@arm.com \
--cc=scott@os.amperecomputing.com \
--cc=sdonthineni@nvidia.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=xhao@linux.alibaba.com \
--cc=zengheng4@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®