lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <faf2b24e-4329-4b73-a012-10e85844fa74@intel.com>
Date: Thu, 26 Sep 2024 09:46:31 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: <babu.moger@....com>, <corbet@....net>, <fenghua.yu@...el.com>,
	<tglx@...utronix.de>, <mingo@...hat.com>, <bp@...en8.de>,
	<dave.hansen@...ux.intel.com>
CC: <x86@...nel.org>, <hpa@...or.com>, <paulmck@...nel.org>,
	<rdunlap@...radead.org>, <tj@...nel.org>, <peterz@...radead.org>,
	<yanjiewtw@...il.com>, <kim.phillips@....com>, <lukas.bulwahn@...il.com>,
	<seanjc@...gle.com>, <jmattson@...gle.com>, <leitao@...ian.org>,
	<jpoimboe@...nel.org>, <rick.p.edgecombe@...el.com>,
	<kirill.shutemov@...ux.intel.com>, <jithu.joseph@...el.com>,
	<kai.huang@...el.com>, <kan.liang@...ux.intel.com>,
	<daniel.sneddon@...ux.intel.com>, <pbonzini@...hat.com>,
	<sandipan.das@....com>, <ilpo.jarvinen@...ux.intel.com>,
	<peternewman@...gle.com>, <maciej.wieczor-retman@...el.com>,
	<linux-doc@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	<eranian@...gle.com>, <james.morse@....com>
Subject: Re: [PATCH v7 16/24] x86/resctrl: Add the interface to assign/update
 counter assignment

Hi Babu,

On 9/26/24 9:28 AM, Moger, Babu wrote:
> Hi Reinette,
> 
> 
> On 9/19/24 12:20, Reinette Chatre wrote:
>> Hi Babu,
>>
>> On 9/4/24 3:21 PM, Babu Moger wrote:
>>> diff --git a/arch/x86/kernel/cpu/resctrl/rdtgroup.c b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>>> index 7ad653b4e768..1d45120ff2b5 100644
>>> --- a/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>>> +++ b/arch/x86/kernel/cpu/resctrl/rdtgroup.c
>>> @@ -864,6 +864,13 @@ static int rdtgroup_rmid_show(struct kernfs_open_file *of,
>>>  	return ret;
>>>  }
>>>  
>>> +/*
>>> + * Get the counter index for the assignable counter
>>> + * 0 for evtid == QOS_L3_MBM_TOTAL_EVENT_ID
>>> + * 1 for evtid == QOS_L3_MBM_LOCAL_EVENT_ID
>>> + */
>>> +#define MBM_EVENT_ARRAY_INDEX(_event) ((_event) - 2)
>>> +
>>>  static int rdtgroup_mbm_assign_mode_show(struct kernfs_open_file *of,
>>>  					 struct seq_file *s, void *v)
>>>  {
>>> @@ -1898,6 +1905,45 @@ int resctrl_arch_assign_cntr(struct rdt_resource *r, struct rdt_mon_domain *d,
>>>  	return 0;
>>>  }
>>>  
>>> +/*
>>> + * Assign a hardware counter to the group.
>>> + * Counter will be assigned to all the domains if rdt_mon_domain is NULL
>>> + * else the counter will be allocated to specific domain.
>>> + */
>>> +int rdtgroup_assign_cntr(struct rdt_resource *r, struct rdtgroup *rdtgrp,
>>> +			 struct rdt_mon_domain *d, enum resctrl_event_id evtid)
>>
>> Could we please review the naming of function as this series progresses? Using such a generic
>> name for this specific function seems to result in its callers later in series having even more
>> generic names that are hard to decipher. For example, later (very generic) "rdtgroup_assign_grp()"
>> calls this function and I find rdtgroup_assign_grp() to be very vague making the code more difficult
>> to follow. For example, rdtgroup_assign_cntr() could be rdtgroup_assign_cntr_event() and
>> rdtgroup_assign_grp() could instead be rdtgroup_assign_cntr()?  Please feel free to improve.
> 
> Sure.
> 
> How about rdtgroup_assign_cntr_event() and rdtgroup_assign_cntr_grp() ?
> 
> Added grp extension for the second one.

Is the "grp" extension needed? The function already has "rdtgroup_" as prefix so
the "grp" extension does not seem necessary to me since I think "rdtgroup_" and "grp"
intend to refer to the same?

Reinette


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ