From: Reinette Chatre <reinette.chatre@intel.com>
To: Ben Horgan <ben.horgan@arm.com>, <james.morse@arm.com>,
<Dave.Martin@arm.com>, <fenghuay@nvidia.com>,
<ruanjinjie@huawei.com>
Cc: <tony.luck@intel.com>, <yu.c.chen@intel.com>,
<babu.moger@amd.com>, <fustini@kernel.org>,
<tan.shaopeng@fujitsu.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <patches@lists.linux.dev>
Subject: Re: [PATCH v3 1/8] arm_mpam: resctrl: Add a helper to find the component counting an event
Date: Fri, 20 Nov 2026 11:31:23 -0800 [thread overview]
Message-ID: <9d1730f5-d9df-4f25-ae94-c3a7dcb6cb2d@intel.com> (raw)
In-Reply-To: <691a76a5-7b22-4c2a-8861-3581791a01c0@arm.com>
Hi Ben,
On 11/18/26 8:28 AM, Ben Horgan wrote:
> On 10/11/2026 04:19, Reinette Chatre wrote:
...
>> +/*
>> + * find_mbwu_mon_comp() - Find the component counting @eventid in a domain
>> + * @d: The monitoring domain to search.
>> + * @eventid: The event to find the counting component for.
>> + *
>> + * The counters reached through this component are the monitors MPAM
>> + * pre-allocated for bandwidth counting. Cache occupancy is not counted by> + * those monitors, it is read on demand via resctrl_arch_rmid_read().
>> + *
>> + * Return: the component counting @eventid in @d, or an error pointer when
>> + * MPAM is disabled, when @eventid is cache occupancy, or when no class was
>> + * picked to count @eventid.
>> + */
>> +static struct mpam_component *find_mbwu_mon_comp(struct rdt_l3_mon_domain *d,
>> + enum resctrl_event_id eventid)
>
> I find this a somewhat strange helper. It's operation is not mbwu specific except for its rejection
> of CSU events and it doesn't support the similar code in resctrl_arch_rmid_read(). Something a bit
> more general that just finds the monitoring component is easier to understand for me.
>
> What do you think of something like the change below? (The baseline is unhelpful, as it's your
> series with the first patch removed and the build fixed but hopefully it illustrates the idea well
> enough.)
>
Thank you very much for the snippet. This looks good to me. I'll incorporate it
in the next version.
Also, thank you very much for the reviews of the other patches in this
series.
Reinette
next prev parent reply other threads:[~2026-11-20 19:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 4:19 [PATCH v3 0/8] arm_mpam: resctrl: Separate MPAM domains Reinette Chatre
2026-11-10 4:19 ` [PATCH v3 1/8] arm_mpam: resctrl: Add a helper to find the component counting an event Reinette Chatre
2026-11-18 16:28 ` Ben Horgan
2026-11-20 19:31 ` Reinette Chatre [this message]
2026-11-10 4:19 ` [PATCH v3 2/8] arm_mpam: resctrl: Use find_component() when allocating a domain Reinette Chatre
2026-11-18 16:46 ` Ben Horgan
2026-11-10 4:19 ` [PATCH v3 3/8] arm_mpam: resctrl: Rename ctrl_comp in mpam_resctrl_alloc_domain() Reinette Chatre
2026-11-10 4:19 ` [PATCH v3 4/8] arm_mpam: resctrl: Do not fail CPU online when domain setup fails Reinette Chatre
2026-11-18 17:01 ` Ben Horgan
2026-11-10 4:19 ` [PATCH v3 5/8] arm_mpam: resctrl: Split control and monitoring domain setup into helpers Reinette Chatre
2026-11-18 17:08 ` Ben Horgan
2026-11-10 4:19 ` [PATCH v3 6/8] arm_mpam: resctrl: Require a component for each monitoring event Reinette Chatre
2026-11-10 4:19 ` [PATCH v3 7/8] arm_mpam: resctrl: Give the monitoring domain its own structure Reinette Chatre
2026-11-10 4:19 ` [PATCH v3 8/8] arm_mpam: resctrl: Rename struct mpam_resctrl_dom to mpam_resctrl_ctrl_dom Reinette Chatre
2026-11-10 11:00 ` [PATCH v3 0/8] arm_mpam: resctrl: Separate MPAM domains Ben Horgan
2026-11-11 6:10 ` Shaopeng Tan (Fujitsu)
2026-11-11 18:35 ` Reinette Chatre
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=9d1730f5-d9df-4f25-ae94-c3a7dcb6cb2d@intel.com \
--to=reinette.chatre@intel.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=fenghuay@nvidia.com \
--cc=fustini@kernel.org \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=ruanjinjie@huawei.com \
--cc=tan.shaopeng@fujitsu.com \
--cc=tony.luck@intel.com \
--cc=yu.c.chen@intel.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