mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Gavin Shan <gshan@redhat.com>
To: Ben Horgan <ben.horgan@arm.com>
Cc: james.morse@arm.com, reinette.chatre@intel.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 v6 3/3] fs/resctrl: Factor MBA parse-time conversion to be per-arch
Date: Mon, 14 Sep 2026 16:03:07 +1000	[thread overview]
Message-ID: <647592d0-d488-4fae-9deb-ceca00ffe52b@redhat.com> (raw)
In-Reply-To: <20260911163613.1131447-4-ben.horgan@arm.com>

On 9/12/26 2:36 AM, Ben Horgan wrote:
> From: Dave Martin <dave.martin@arm.com>
> 
> The control value parser for the MB resource currently coerces the memory
> bandwidth percentage value from userspace to be an exact multiple of the
> rdt_resource::resctrl_membw::bw_gran parameter.
> 
> On MPAM systems, this results in somewhat worse-than-worst-case rounding, since
> the bandwidth granularity advertised to resctrl by the MPAM driver is in general
> only an approximation to the actual hardware granularity on these systems, and
> the hardware bandwidth allocation control value is not natively a percentage --
> necessitating a further conversion in the resctrl_arch_update_domains() path,
> regardless of the conversion done at parse time.
> 
> For MPAM and x86 use their custom pre-prepared parse-time conversion,
> resctrl_arch_preconvert_bw(). This will avoid accumulated error from rounding
> the value twice on MPAM systems. For x86 systems there is no functional change.
> 
> Clarify the documentation, but avoid overly exact promises.
> 
> Clamping to bw_min and bw_max still feels generic: leave it in the core code,
> for now.
> 
> [ BH: Split out x86 specific changes ]
> Signed-off-by: Dave Martin <Dave.Martin@arm.com>
> Signed-off-by: Ben Horgan <Ben.Horgan@arm.com>
> Reviewed-by: Ben Horgan <ben.horgan@arm.com>
> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
> ---
> Changes since v3:
> Parameter order swap (Reinette)
> Reflow commit message to use 80 characters (Reinette)
> Adjust comment line length (Reinette)
> Add Reinette's R-b
> 
> Changes since v4:
> Make Dave the author as he wrote the patch
> 
> Changes since v5:
> Document that the rounding can be up or down
> ---
>   Documentation/filesystems/resctrl.rst | 17 +++++++++--------
>   fs/resctrl/ctrlmondata.c              |  6 +++---
>   2 files changed, 12 insertions(+), 11 deletions(-)
> 

Reviewed-by: Gavin Shan <gshan@redhat.com>


  reply	other threads:[~2026-09-14  6:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-11 16:36 [PATCH v6 0/3] x86,fs/resctrl,arm_mpam: " Ben Horgan
2026-09-11 16:36 ` [PATCH v6 1/3] x86,fs/resctrl: Add resctrl_arch_preconvert_bw() Ben Horgan
2026-09-14  6:02   ` Gavin Shan
2026-09-14 19:08   ` [tip: x86/cache] " tip-bot2 for Dave Martin
2026-09-11 16:36 ` [PATCH v6 2/3] arm_mpam: resctrl: Add pass-through resctrl_arch_preconvert_bw() Ben Horgan
2026-09-14  6:02   ` Gavin Shan
2026-09-14 19:08   ` [tip: x86/cache] " tip-bot2 for Ben Horgan
2026-09-11 16:36 ` [PATCH v6 3/3] fs/resctrl: Factor MBA parse-time conversion to be per-arch Ben Horgan
2026-09-14  6:03   ` Gavin Shan [this message]
2026-09-14 19:08   ` [tip: x86/cache] " tip-bot2 for Dave Martin
2026-09-14 14:51 ` [PATCH v6 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=647592d0-d488-4fae-9deb-ceca00ffe52b@redhat.com \
    --to=gshan@redhat.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=reinette.chatre@intel.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

all inboxes | Powered by JetHome®