mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Reinette Chatre <reinette.chatre@intel.com>
Cc: <tony.luck@intel.com>, <ben.horgan@arm.com>,
	<james.morse@arm.com>, <Dave.Martin@arm.com>,
	<babu.moger@amd.com>, <bp@alien8.de>, <tglx@linutronix.de>,
	<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
	<fustini@kernel.org>, <fenghuay@nvidia.com>,
	<peternewman@google.com>, <linux-kernel@vger.kernel.org>,
	<patches@lists.linux.dev>, <chen.yu@linux.dev>
Subject: Re: [PATCH 1/5] fs/resctrl: Drop support for different bandwidth delay mappings
Date: Mon, 7 Sep 2026 10:08:10 +0800	[thread overview]
Message-ID: <f5836c85-189b-4c5f-acdc-f77ec6d24263@intel.com> (raw)
In-Reply-To: <b5b1fb15-3a83-4b91-b9b8-8bc724e5312a@intel.com>

On 9/4/2026 11:50 PM, Reinette Chatre wrote:
> Hi Chenyu,
> 
> On 9/3/26 8:33 PM, Chen Yu wrote:
>> On Thu, Sep 03, 2026 at 09:57:03AM -0700, Reinette Chatre wrote:
>>>   
>>> -/*
>>> - * Map the memory b/w percentage value to delay values
>>> - * that can be written to QOS_MSRs.
>>> - * There are currently no SKUs which support non linear delay values.
>>> - */
>>> -static u32 delay_bw_map(unsigned long bw, struct rdt_resource *r)
>>> -{
>>> -	if (r->membw.delay_linear)
>>> -		return MAX_MBA_BW - bw;
>>> -
>>> -	pr_warn_once("Non Linear delay-bw map not supported but queried\n");
>>> -	return MAX_MBA_BW;
>>> -}
>>> -
>>>   static void mba_wrmsr_intel(struct msr_param *m)
>>>   {
>>>   	struct rdt_hw_ctrl_domain *hw_dom = resctrl_to_arch_ctrl_dom(m->dom);
>>>   	struct rdt_hw_resource *hw_res = resctrl_to_arch_res(m->res);
>>>   	unsigned int i;
>>>   
>>> -	/*  Write the delay values for mba. */
>>> +	if (!m->res->membw.delay_linear) {
>>> +		pr_warn_once("Non-linear bandwidth delay not supported\n");
>>> +		return;
>>
>> Previously if linear delay is not supported, we still write MAX_MBA_BW
>> to MSR, and here we return with MSR untouched, this should be the expected
>> behavior?
> 
> I believe so, yes. Two reasons:
> a) This is not a supported scenario. This code path should never execute
>     and already complains loudly if encountered.
> b) In the unlikely case that this unsupported scenario is encountered I
>     find leaving the hardware as-is to be the safer option.
> 
>> Besides, in patch 2, __get_mem_config_intel() returns false for
>> non-linear-delay platform thus MB resource's alloc_capable is false,
>> do we still need to do the linear check in mba_wrmsr_intel() in patch 1
>> as the code path will not be triggered?
> 
> You are right that the check is not required. I view this check more like
> why we use "lockdep_assert_held()". More specifically, it uses the code to
> document the requirements instead of comments. For Intel this is valuable
> since the transition to controls and their flags means that when a developer
> builds on the new resctrl capabilities to initialize multiple controls it is
> required for *each* control to have the "this scalar is linear" flag set. This
> test makes that requirement clear.
> 

Got it, thanks for the explanation, this makes sense to me.

Reviewed-by: Chen Yu <yu.c.chen@intel.com>

thanks,
Chenyu

  reply	other threads:[~2026-09-07  2:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-03 16:57 [PATCH 0/5] x86,fs/resctrl: Cleanups in preparation for multiple Reinette Chatre
2026-09-03 16:57 ` [PATCH 1/5] fs/resctrl: Drop support for different bandwidth delay mappings Reinette Chatre
2026-09-04  3:33   ` Chen Yu
2026-09-04 15:50     ` Reinette Chatre
2026-09-07  2:08       ` Chen, Yu C [this message]
2026-09-03 16:57 ` [PATCH 2/5] x86,fs/resctrl: Remove "arch_needs_linear" Reinette Chatre
2026-09-04  3:14   ` Chen Yu
2026-09-04 15:50     ` Reinette Chatre
2026-09-07  2:10       ` Chen, Yu C
2026-09-08 16:18         ` Reinette Chatre
2026-09-03 16:57 ` [PATCH 3/5] x86,fs/resctrl: Make MSR_IA32_L{2,3}_QOS_CFG scope architecture specific Reinette Chatre
2026-09-03 16:57 ` [PATCH 4/5] fs/resctrl: Drop unnecessary is_mba_linear() helper Reinette Chatre
2026-09-04  4:38   ` Chen Yu
2026-09-04 15:51     ` Reinette Chatre
2026-09-07  9:15   ` Ben Horgan
2026-09-03 16:57 ` [PATCH 5/5] fs/resctrl: Drop unnecessary parameter from resctrl_io_alloc_parse_line() Reinette Chatre
2026-09-07  9:21   ` Ben Horgan
2026-09-08 16:28     ` Reinette Chatre
2026-09-03 17:02 ` [PATCH 0/5] x86,fs/resctrl: Cleanups in preparation for multiple 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=f5836c85-189b-4c5f-acdc-f77ec6d24263@intel.com \
    --to=yu.c.chen@intel.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=bp@alien8.de \
    --cc=chen.yu@linux.dev \
    --cc=dave.hansen@linux.intel.com \
    --cc=fenghuay@nvidia.com \
    --cc=fustini@kernel.org \
    --cc=hpa@zytor.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --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®