From: Jinjie Ruan <ruanjinjie@huawei.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
<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>
Cc: <x86@kernel.org>, <hpa@zytor.com>, <fustini@kernel.org>,
<fenghuay@nvidia.com>, <peternewman@google.com>,
<yu.c.chen@intel.com>, <linux-kernel@vger.kernel.org>,
<patches@lists.linux.dev>
Subject: Re: [PATCH v2 4/5] fs/resctrl: Drop unnecessary is_mba_linear() helper
Date: Tue, 27 Oct 2026 16:34:06 +0800 [thread overview]
Message-ID: <48a17188-cddb-4759-b5df-2ba5691f17ac@huawei.com> (raw)
In-Reply-To: <816855328d87740b2cb720215d222702abba4b0f.1791406459.git.reinette.chatre@intel.com>
在 2026/10/8 5:06, Reinette Chatre 写道:
> is_mba_linear() assumes it operates on the MBA resource and returns whether
> the resource's delay values are linear. There is only one caller that
> separately makes the same assumption.
>
> Avoid duplicating the resource assumptions and let the only caller access
> the needed property directly.
>
> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
> Reviewed-by: Chen Yu <yu.c.chen@intel.com>
> Reviewed-by: Ben Horgan <ben.horgan@arm.com>
> ---
> Changes from RFC v1:
> - RFC v1 made bandwidth delay a resource property. That change was dropped
> and this cleanup is all that remained.
>
> Changes since v1:
> - Add Chenyu and Ben's Reviewed-by tags.
> - Clarify "resource is linear" vs. "resource's delay values are linear".
> ---
> fs/resctrl/rdtgroup.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/fs/resctrl/rdtgroup.c b/fs/resctrl/rdtgroup.c
> index 68be9b903ac6..821c6e2b10f4 100644
> --- a/fs/resctrl/rdtgroup.c
> +++ b/fs/resctrl/rdtgroup.c
> @@ -2577,11 +2577,6 @@ mongroup_create_dir(struct kernfs_node *parent_kn, struct rdtgroup *prgrp,
> return ret;
> }
>
> -static inline bool is_mba_linear(void)
> -{
> - return resctrl_arch_get_resource(RDT_RESOURCE_MBA)->membw.delay_linear;
> -}
> -
> static int mba_sc_domain_allocate(struct rdt_resource *r, struct rdt_ctrl_domain *d)
> {
> u32 num_closid = resctrl_arch_get_num_closid(r);
> @@ -2621,7 +2616,7 @@ static bool supports_mba_mbps(void)
> struct rdt_resource *r = resctrl_arch_get_resource(RDT_RESOURCE_MBA);
>
> return (resctrl_is_mbm_enabled() &&
> - r->alloc_capable && is_mba_linear() &&
> + r->alloc_capable && r->membw.delay_linear &&
LGTM
Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
> r->ctrl_scope == rmbm->mon_scope &&
> !rmbm->mon.mbm_cntr_assignable);
> }
--
Best regards,
Jinjie
next prev parent reply other threads:[~2026-10-27 8:34 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-07 21:06 [PATCH v2 0/5] x86,fs/resctrl: Cleanups in preparation for multiple controls support Reinette Chatre
2026-10-07 21:06 ` [PATCH v2 1/5] x86,fs/resctrl: Remove unused non-linear bandwidth delay mapping Reinette Chatre
2026-10-27 8:07 ` Jinjie Ruan
2026-10-07 21:06 ` [PATCH v2 2/5] x86,fs/resctrl: Remove unnecessary non-linear MBA configuration check Reinette Chatre
2026-10-08 7:14 ` Chen Yu
2026-10-27 8:29 ` Jinjie Ruan
2026-10-07 21:06 ` [PATCH v2 3/5] x86,fs/resctrl: Move MSR_IA32_L{2,3}_QOS_CFG scope property to x86 resource Reinette Chatre
2026-10-18 17:40 ` Chen Yu
2026-10-19 23:06 ` Reinette Chatre
2026-10-20 6:05 ` Chen Yu
2026-10-20 21:01 ` Reinette Chatre
2026-10-07 21:06 ` [PATCH v2 4/5] fs/resctrl: Drop unnecessary is_mba_linear() helper Reinette Chatre
2026-10-27 8:34 ` Jinjie Ruan [this message]
2026-10-07 21:06 ` [PATCH v2 5/5] fs/resctrl: Drop unnecessary parameter from resctrl_io_alloc_parse_line() Reinette Chatre
2026-10-18 17:44 ` Chen Yu
2026-10-27 8:35 ` Jinjie Ruan
2026-10-27 14:36 ` Reinette Chatre
2026-10-08 16:12 ` [PATCH v2 0/5] x86,fs/resctrl: Cleanups in preparation for multiple controls support Luck, Tony
2026-10-08 22:48 ` 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=48a17188-cddb-4759-b5df-2ba5691f17ac@huawei.com \
--to=ruanjinjie@huawei.com \
--cc=Dave.Martin@arm.com \
--cc=babu.moger@amd.com \
--cc=ben.horgan@arm.com \
--cc=bp@alien8.de \
--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 \
--cc=yu.c.chen@intel.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®