Re: [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v4 3/5] arm_mpam: Provide conversion method for new closid/rmid pairs
From: Zeng Heng
Date: Sun Feb 16 2025 - 22:32:50 EST
Hi Martin,
On 2025/1/4 18:12, Zeng Heng wrote:
The MPAM driver statically assigns all reqPARTIDs to respective intPARTIDs.
For the new rmid allocation strategy, it will check if there is an
available rmid of any reqPARTID which belongs to the input closid, not just
the rmids belonging to the closid.
For a mixture of MSCs system, for MSCs that do not support narrow-partid,
we use the PARTIDs exceeding the number of closids as reqPARTIDs for
expanding the monitoring groups.
In order to keep the existing resctrl API interface, the rmid contains both
req_idx and PMG information instead of PMG only under the MPAM driver. The
req_idx represents the req_idx-th sub-monitoring group under the control
group. The new rmid would be like:
rmid = (req_idx << shift | pmg).
To consider future compatibility with dynamically allocated reqpartid,
should I refactor the rmid?
Instead of defining rmid.req_idx, we could place the entire reqpartid
directly within rmid. In This way, the allocation of reqpartid will no
longer be constrained by the static allocation of closid, facilitating
future compatibility with dynamic allocation mechanisms. In this way,
it needs to refactor the resctrl_arch_rmid_idx_encode() and
resctrl_arch_rmid_idx_decode(), and we can simplify
closid_rmid2reqpartid() to rmid2reqpartid().
What are your thoughts on this idea? Thank you in advance for your
reply.
Best regards,
Zeng Heng