mbox series

[RFC,mpam,mpam/snapshot/v6.12-rc1,v3,0/5] arm_mpam: Introduce the Narrow-PARTID feature for MPAM driver

Message ID 20241207092136.2488426-1-zengheng4@huawei.com (mailing list archive)
Headers show
Series arm_mpam: Introduce the Narrow-PARTID feature for MPAM driver | expand

Message

Zeng Heng Dec. 7, 2024, 9:21 a.m. UTC
The patch set is applied for mpam/snapshot/v6.12-rc1 branch of
https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
repository.

The narrow-partid feature in MPAM allows for a more efficient use of
PARTIDs by enabling a many-to-one mapping of reqpartids (requested PARTIDs)
to intpartids (internal PARTIDs). This mapping reduces the number of unique
PARTIDs needed, thus allowing more tasks or processes to be monitored and
managed with the available resources.

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).

The new conversion relationship between closid/rmid and (req)PARTID/PMG is:

    (req)PARTID = (rmid.req_idx * n) + closid,
    PMG = rmid.pmg.

Each intPARTID has m reqPARTIDs, which are used to expand the number of
monitoring groups under the control group. Therefore, the number of
monitoring groups is no longer limited by the range of MPAM PMG, which
enhances the extensibility of the system's monitoring capabilities.

---
Compared with v1:
  - Rebase this patch set on latest MPAM driver of the v6.12-rc1 branch.

Compared with v2:
  - Refactor closid/rmid pair translation
  - Simplify the logic of synchronize configuration
  - Remove reqPARTID pool
---

Dave Martin (1):
  arm_mpam: Set INTERNAL as needed when setting MSC controls

Zeng Heng (4):
  arm_mpam: Introduce the definitions of intPARTID and reqPARTID
  arm_mpam: Read monitor value with new closid/rmid pair
  arm_mpam: Automatically synchronize the configuration of all
    sub-monitoring groups
  arm_mpam: Adapting the closid/rmid matching determination functions

 arch/arm64/include/asm/mpam.h               |   6 +-
 drivers/platform/arm64/mpam/mpam_devices.c  |  61 +++++++--
 drivers/platform/arm64/mpam/mpam_internal.h |   5 +
 drivers/platform/arm64/mpam/mpam_resctrl.c  | 142 +++++++++++++++-----
 4 files changed, 170 insertions(+), 44 deletions(-)

--
2.25.1