From: "Shaopeng Tan (Fujitsu)" <tan.shaopeng@fujitsu.com>
To: 'Dave Martin' <Dave.Martin@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Zeng Heng <zengheng4@huawei.com>,
James Morse <james.morse@arm.com>
Subject: RE: [RFC PATCH v2 07/11] arm_mpam: [NFU] Rework ID remapping to use a kernel command-line argument
Date: Wed, 29 Jan 2025 10:57:04 +0000 [thread overview]
Message-ID: <OSZPR01MB87987EEDAD9B27BEDCFB37A08BEE2@OSZPR01MB8798.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20250117151033.1517882-20-Dave.Martin@arm.com>
Hello,
> Hacking the source is an acceptable interface for experimentation, but not very
> convenient.
>
> Instead, add a kernel command-line parameter mpam_partid_per_closid=<n>
> to specify how many PARTIDs are used to provide monitoring groups for each
> resctrl CLOSID.
>
> This change is not intended for upstream.
Are you looking for an alternative to using kernel command-line parameter?
Specifying the number of monitoring groups under one resource control group might make it easier for users to understand. For example, mongrps_per_ctrlgrp.
Best regards,
Shaopeng TAN
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> ---
> drivers/platform/arm64/mpam/mpam_resctrl.c | 22
> ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
>
> diff --git a/drivers/platform/arm64/mpam/mpam_resctrl.c
> b/drivers/platform/arm64/mpam/mpam_resctrl.c
> index f834753a3274..eb1ef5d2bc57 100644
> --- a/drivers/platform/arm64/mpam/mpam_resctrl.c
> +++ b/drivers/platform/arm64/mpam/mpam_resctrl.c
> @@ -3,6 +3,9 @@
>
> #define pr_fmt(fmt) "mpam: resctrl: " fmt
>
> +#undef KBUILD_MODNAME
> +#define KBUILD_MODNAME "mpam"
> +
> #include <linux/arm_mpam.h>
> #include <linux/cacheinfo.h>
> #include <linux/cpu.h>
> @@ -10,6 +13,7 @@
> #include <linux/errno.h>
> #include <linux/limits.h>
> #include <linux/list.h>
> +#include <linux/moduleparam.h>
> #include <linux/printk.h>
> #include <linux/rculist.h>
> #include <linux/resctrl.h>
> @@ -158,6 +162,24 @@ static bool mpam_resctrl_hide_cdp(enum
> resctrl_res_level rid)
>
> static unsigned int partid_per_closid = 1;
>
> +static int mpam_resctrl_partid_per_closid_set(const char *val,
> + const struct kernel_param *kp)
> {
> + /*
> + * 16 in an arbitrary maximum, sufficient for experimentation
> + * but not ridiculously large:
> + */
> + return param_set_uint_minmax(val, kp, 1, 16); }
> +
> +static const struct kernel_param_ops mpam_resctrl_partid_per_closid_ops
> = {
> + .set = mpam_resctrl_partid_per_closid_set,
> + .get = param_get_uint,
> +};
> +
> +device_param_cb(partid_per_closid, &mpam_resctrl_partid_per_closid_ops,
> + &partid_per_closid, 0444);
> +
> static unsigned int mpam_num_pmg(void)
> {
> return mpam_pmg_max + 1;
> --
> 2.34.1
next prev parent reply other threads:[~2025-01-29 10:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 15:10 [RFC PATCH v2 00/11] Introduce PARTID grouping support Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 01/11] arm_mpam: Fix read-back of cloned resource controls under CDP emulation Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 02/11] arm_mpam: Delete unused function resctrl_arch_set_rmid() Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 03/11] arm_mpam: Set INTERNAL as needed when setting MSC controls Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 04/11] fs/resctrl: Add arch hook to set up the default CLOSID Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 05/11] arm_mpam: resctrl: Implement " Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 06/11] arm_mpam: Introduce flexible CLOSID/RMID translation Dave Martin
2025-01-29 10:40 ` Shaopeng Tan (Fujitsu)
2025-01-17 15:10 ` [RFC PATCH v2 07/11] arm_mpam: [NFU] Rework ID remapping to use a kernel command-line argument Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 08/11] arm_mpam: [NFU] Development diagnostics for MPAM ID assignments Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 09/11] arm_mpam: Add control partition identifier to mpam_config Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 10/11] arm_mpam: Skip inapplicable cases when reprogramming a resctrl domain Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 11/11] arm_mpam: Detect whether the system can alias PARTIDs Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 00/11] Introduce PARTID grouping support Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 01/11] arm_mpam: Fix read-back of cloned resource controls under CDP emulation Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 02/11] arm_mpam: Delete unused function resctrl_arch_set_rmid() Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 03/11] arm_mpam: Set INTERNAL as needed when setting MSC controls Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 04/11] fs/resctrl: Add arch hook to set up the default CLOSID Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 05/11] arm_mpam: resctrl: Implement " Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 06/11] arm_mpam: Introduce flexible CLOSID/RMID translation Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 07/11] arm_mpam: [NFU] Rework ID remapping to use a kernel command-line argument Dave Martin
2025-01-29 10:57 ` Shaopeng Tan (Fujitsu) [this message]
2025-01-17 15:10 ` [RFC PATCH v2 08/11] arm_mpam: [NFU] Development diagnostics for MPAM ID assignments Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 09/11] arm_mpam: Add control partition identifier to mpam_config Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 10/11] arm_mpam: Skip inapplicable cases when reprogramming a resctrl domain Dave Martin
2025-01-17 15:10 ` [RFC PATCH v2 11/11] arm_mpam: Detect whether the system can alias PARTIDs 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=OSZPR01MB87987EEDAD9B27BEDCFB37A08BEE2@OSZPR01MB8798.jpnprd01.prod.outlook.com \
--to=tan.shaopeng@fujitsu.com \
--cc=Dave.Martin@arm.com \
--cc=james.morse@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®