Linux Documentation
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Ben Horgan <ben.horgan@arm.com>
Cc: <james.morse@arm.com>, <fenghuay@nvidia.com>,
	<linux-kernel@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>, <tglx@linutronix.de>,
	<mingo@redhat.com>, <bp@alien8.de>, <dave.hansen@linux.intel.com>,
	<hpa@zytor.com>, <corbet@lwn.net>, <x86@kernel.org>,
	<linux-doc@vger.kernel.org>, <dave.martin@arm.com>
Subject: Re: [PATCH v3 1/3] x86/resctrl: Add resctrl_arch_preconvert_bw()
Date: Fri, 5 Jun 2026 11:42:29 -0700	[thread overview]
Message-ID: <d40c6732-de2a-40b7-af28-6853fe4d3045@intel.com> (raw)
In-Reply-To: <20260515140612.1205251-2-ben.horgan@arm.com>

Hi Ben,

Since this patch also impacts resctrl fs API in include/linux/resctrl.h the
subject prefix would more accurate as "x86,fs/resctrl: Add ..."

On 5/15/26 7:06 AM, Ben Horgan wrote:

...

> @@ -500,6 +500,25 @@ bool resctrl_arch_mbm_cntr_assign_enabled(struct rdt_resource *r);
>   */
>  int resctrl_arch_mbm_cntr_assign_set(struct rdt_resource *r, bool enable);
>  
> +/**
> + * resctrl_arch_preconvert_bw() - Prepare bandwidth control value for arch use.
> + * @val:	Bandwidth control value written to the schemata file by userspace.
> + * @r:		Resource whose schema was written.
> + *
> + * Convert the user provided bandwidth control value to an appropriate form for
> + * consumption by the hardware driver for resource @r. Converted value is stored
> + * in rdt_ctrl_domain::staged_config[] for later consumption by
> + * resctrl_arch_update_domains(). Is not called when MBA software controller is
> + * enabled.
> + *
> + * Architectures for which this pre-conversion hook is not useful should supply
> + * an implementation of this function that just returns val unmodified.

nit: "val" -> "@val"

> + *
> + * Return:
> + * The converted value.
> + */
> +u32 resctrl_arch_preconvert_bw(u32 val, const struct rdt_resource *r);

Could you please switch the resource to be the first parameter? When comparing 
this to other similar arch helpers in include/linux/resctrl.h it is custom for the resource
to be the first parameter.

> +
>  /*
>   * Update the ctrl_val and apply this config right now.
>   * Must be called on one of the domain's CPUs.

| Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>

Reinette

  reply	other threads:[~2026-06-05 18:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 14:06 [PATCH v3 0/3] x86,fs/resctrl,arm_mpam: Factor MBA parse-time conversion to be per-arch Ben Horgan
2026-05-15 14:06 ` [PATCH v3 1/3] x86/resctrl: Add resctrl_arch_preconvert_bw() Ben Horgan
2026-06-05 18:42   ` Reinette Chatre [this message]
2026-05-15 14:06 ` [PATCH v3 2/3] arm_mpam: resctrl: Add pass-through resctrl_arch_preconvert_bw() Ben Horgan
2026-06-05 18:43   ` Reinette Chatre
2026-05-15 14:06 ` [PATCH v3 3/3] fs/resctrl: Factor MBA parse-time conversion to be per-arch Ben Horgan
2026-06-05 18:43   ` Reinette Chatre
2026-06-05 18:41 ` [PATCH v3 0/3] x86,fs/resctrl,arm_mpam: " Reinette Chatre

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=d40c6732-de2a-40b7-af28-6853fe4d3045@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=dave.martin@arm.com \
    --cc=fenghuay@nvidia.com \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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