[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250104101224.873926-1-zengheng4@huawei.com>
Date: Sat, 4 Jan 2025 18:12:19 +0800
From: Zeng Heng <zengheng4@...wei.com>
To: <Dave.Martin@....com>, <james.morse@....com>
CC: <bobo.shaobowang@...wei.com>, <linux-arm-kernel@...ts.infradead.org>,
<jonathan.cameron@...wei.com>, <linux-kernel@...r.kernel.org>
Subject: [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v4 0/5] arm_mpam: Introduce the Narrow-PARTID feature for MPAM driver
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 one 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 source bitmap
Compared with v3:
- Add limitation of the Narrow-PARTID feature (See Patch 2).
- Remove redundant reqpartid2closid() and reqpartid_pmg2rmid().
- Refactor closid_rmid2reqpartid() partially.
- Merge the PARTID conversion-related patches into a single patch for
bisectability.
- Skip adaptation of resctrl_arch_set_rmid() which is going to be
removed.
---
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: Add limitation for the Narrow-PARTID feature
arm_mpam: Provide conversion method for new closid/rmid pairs
arm_mpam: Automatically synchronize the configuration of all
sub-monitoring groups
drivers/platform/arm64/mpam/mpam_devices.c | 61 ++++++--
drivers/platform/arm64/mpam/mpam_internal.h | 5 +
drivers/platform/arm64/mpam/mpam_resctrl.c | 152 +++++++++++++++-----
3 files changed, 174 insertions(+), 44 deletions(-)
--
2.25.1
Powered by blists - more mailing lists