From: Dave Martin <Dave.Martin@arm.com>
To: Zeng Heng <zengheng4@huawei.com>
Cc: james.morse@arm.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
jonathan.cameron@huawei.com, xiexiuqi@huawei.com
Subject: Re: [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 0/5] arm_mpam: Introduce the Narrow-PARTID feature for MPAM driver
Date: Thu, 12 Dec 2024 16:17:56 +0000 [thread overview]
Message-ID: <Z1sMtF9bvw5NZOC6@e133380.arm.com> (raw)
In-Reply-To: <20241207092136.2488426-1-zengheng4@huawei.com>
Hi,
On Sat, Dec 07, 2024 at 05:21:31PM +0800, Zeng Heng wrote:
> 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.
Mixed systems still seem not to be handled completely by this series?
You do cope with the scenario where some MSCs support Narrowing and
some do not, but there is still the problem of incompatible controls.
If a non-Narrowing MSC has controls that are not of the "partition
bitmap" type, then splitting a resctrl control group across multiple
PARTIDs is going to change the hardware regulation behaviour. There
does not seem to be any way to work around this be programming
different control values (for example). So, there may be over- or
under-allocation of resources compared with what the user requests in
resctrlfs.
So, I think there is still a need to check which controls are present,
and either disable the use of non-identity intPARTID<->reqPARTID
mappings if incompatible controls are present (or don't expose those
controls to resctrl).
(If you were not trying to address this issue yet then that is not a
problem for an RFC, but it is best to be clear about the
limitations...)
> 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
> ---
This approach looks reasonable overall, and in this version the changes
do seem to be better localised in the mpam_resctrl.c glue code now.
I had also been working on a similar approach, so I have posted it for
comparison [1] -- though the two approaches are doing pretty much the
same thing, some details differ.
(Note, I have not addressed PARTID Narrowing at all yet; however,
I think more thought is needed for that.)
Note: Are there bisection issues with some of the patches in the
series? It looks like not all of the ID conversions are applied in the
same patch, so I'm wondering whether strange behaviour may be seen at
the intermediate commits.
Cheers
---Dave
[1] [RFC PATCH 0/6] Introduce flexible CLOSID/RMID translation
https://lore.kernel.org/lkml/20241212154000.330467-1-Dave.Martin@arm.com/
next prev parent reply other threads:[~2024-12-12 17:13 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-07 9:21 [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 0/5] arm_mpam: Introduce the Narrow-PARTID feature for MPAM driver Zeng Heng
2024-12-07 9:21 ` [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 1/5] arm_mpam: Introduce the definitions of intPARTID and reqPARTID Zeng Heng
2024-12-07 9:21 ` [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 2/5] arm_mpam: Read monitor value with new closid/rmid pair Zeng Heng
2024-12-12 16:18 ` Dave Martin
2024-12-19 13:39 ` Zeng Heng
2025-01-03 6:55 ` Zeng Heng
2025-01-03 15:31 ` Dave Martin
2025-01-04 9:15 ` Zeng Heng
2024-12-07 9:21 ` [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 3/5] arm_mpam: Set INTERNAL as needed when setting MSC controls Zeng Heng
2024-12-07 9:21 ` [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 4/5] arm_mpam: Automatically synchronize the configuration of all sub-monitoring groups Zeng Heng
2024-12-12 16:18 ` Dave Martin
2024-12-20 9:36 ` Zeng Heng
2025-01-02 16:34 ` Dave Martin
2024-12-07 9:21 ` [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 5/5] arm_mpam: Adapting the closid/rmid matching determination functions Zeng Heng
2024-12-12 16:19 ` Dave Martin
2024-12-20 7:45 ` Zeng Heng
2024-12-12 16:17 ` Dave Martin [this message]
2024-12-20 10:59 ` [RFC PATCH mpam mpam/snapshot/v6.12-rc1 v3 0/5] arm_mpam: Introduce the Narrow-PARTID feature for MPAM driver Zeng Heng
2025-01-02 16:45 ` Dave Martin
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=Z1sMtF9bvw5NZOC6@e133380.arm.com \
--to=dave.martin@arm.com \
--cc=james.morse@arm.com \
--cc=jonathan.cameron@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=xiexiuqi@huawei.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;
as well as URLs for NNTP newsgroup(s).