mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Reinette Chatre <reinette.chatre@intel.com>
To: Jinjie Ruan <ruanjinjie@huawei.com>, <ben.horgan@arm.com>,
	<james.morse@arm.com>, <Dave.Martin@arm.com>,
	<fenghuay@nvidia.com>
Cc: <tony.luck@intel.com>, <yu.c.chen@intel.com>,
	<babu.moger@amd.com>, <fustini@kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <patches@lists.linux.dev>
Subject: Re: [RFC PATCH v2 02/10] arm_mpam: resctrl: Rename ctrl_comp in mpam_resctrl_alloc_domain()
Date: Fri, 23 Oct 2026 07:53:16 -0700	[thread overview]
Message-ID: <6f867f7f-2c02-4770-8900-2996dfc9d37f@intel.com> (raw)
In-Reply-To: <63de9d6d-96c9-401e-963e-0e3183ef5fd1@huawei.com>



On 10/23/26 1:08 AM, Jinjie Ruan wrote:
> 
> 
> 在 2026/10/20 6:07, Reinette Chatre 写道:
>> mpam_resctrl_alloc_domain() looks up the component of the resource's
>> class that contains the CPU and fails the domain allocation if there is
>> none. The component is held in a local variable named ctrl_comp and, when
>> the resource supports allocation, it also backs the control domain.
>>
>> The lookup and its check apply to every resource, including one that
>> supports only monitoring. For such a resource the component does not
>> back a control domain, so the name ctrl_comp is misleading. The name also
>> makes a comment in the same function ambiguous. The comment notes that
>> there may be no ctrl_comp for the L3, which is true of the control
>> domain's component but contradicts the local variable, which always
>> refers to a component once the lookup succeeds.
>>
>> Rename the local variable to comp. Keep the ctrl_comp name for the
>> control domain's reference to its component because it only ever refers
>> to the component that backs the control domain. Leave the comment
>> unchanged since it now unambiguously refers to that component.
>>
>> No functional change.
>>
>> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
>> ---
>>  drivers/resctrl/mpam_resctrl.c | 10 +++++-----
>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/resctrl/mpam_resctrl.c b/drivers/resctrl/mpam_resctrl.c
>> index 3d5f90f9f1f3..b07e5dd895dd 100644
>> --- a/drivers/resctrl/mpam_resctrl.c
>> +++ b/drivers/resctrl/mpam_resctrl.c
>> @@ -1623,14 +1623,14 @@ mpam_resctrl_alloc_domain(unsigned int cpu, struct mpam_resctrl_res *res)
>>  	struct rdt_l3_mon_domain *mon_d;
>>  	struct rdt_ctrl_domain *ctrl_d;
>>  	struct mpam_class *class = res->class;
>> -	struct mpam_component *ctrl_comp;
>> +	struct mpam_component *comp;
>>  	struct rdt_resource *r = &res->resctrl_res;
> 
> Reviewed-by: Jinjie Ruan <ruanjinjie@huawei.com>
> 
Thank you very much.

Reinette


  reply	other threads:[~2026-10-23 14:53 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 22:07 [RFC PATCH v2 00/10] arm_mpam: resctrl: Separate MPAM domains Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 01/10] arm_mpam: resctrl: Use find_component() when allocating a domain Reinette Chatre
2026-10-23  8:07   ` Jinjie Ruan
2026-10-23  8:07   ` Jinjie Ruan
2026-10-23 14:52     ` Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 02/10] arm_mpam: resctrl: Rename ctrl_comp in mpam_resctrl_alloc_domain() Reinette Chatre
2026-10-23  8:08   ` Jinjie Ruan
2026-10-23 14:53     ` Reinette Chatre [this message]
2026-10-19 22:07 ` [RFC PATCH v2 03/10] arm_mpam: resctrl: Do not fail CPU online when domain setup fails Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 04/10] arm_mpam: resctrl: Split control and monitoring domain setup into helpers Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 05/10] arm_mpam: resctrl: Give the monitoring domain its own structure Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 06/10] arm_mpam: resctrl: Rename struct mpam_resctrl_dom to mpam_resctrl_ctrl_dom Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 07/10] arm_mpam: resctrl: Warn when no monitoring component is found for a CPU Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 08/10] arm_mpam: resctrl: Require a component for each monitoring event Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 09/10] arm_mpam: resctrl: Require monitoring components to cover the same CPUs Reinette Chatre
2026-10-19 22:07 ` [RFC PATCH v2 10/10] arm_mpam: resctrl: Update the comment on monitoring domain setup Reinette Chatre
2026-10-22 10:45 ` [RFC PATCH v2 00/10] arm_mpam: resctrl: Separate MPAM domains Ben Horgan
2026-10-22 15:43   ` 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=6f867f7f-2c02-4770-8900-2996dfc9d37f@intel.com \
    --to=reinette.chatre@intel.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=ben.horgan@arm.com \
    --cc=fenghuay@nvidia.com \
    --cc=fustini@kernel.org \
    --cc=james.morse@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=ruanjinjie@huawei.com \
    --cc=tony.luck@intel.com \
    --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®