mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Swapnil Sapkal <swapnil.sapkal@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
	<tony.luck@intel.com>, <babu.moger@amd.com>,
	<fenghua.yu@intel.com>, <shuah@kernel.org>
Cc: <Dave.Martin@arm.com>, <james.morse@arm.com>,
	<peternewman@google.com>, <eranian@google.com>,
	<tan.shaopeng@fujitsu.com>, <linux-kernel@vger.kernel.org>,
	<linux-kselftest@vger.kernel.org>, <x86@kernel.org>
Subject: Re: [PATCH v5 1/5] selftests/resctrl: Rename variables and functions to generic names
Date: Tue, 3 Nov 2026 11:43:09 +0530	[thread overview]
Message-ID: <5fbcef9c-4c3f-4386-968a-01a81c67900e@amd.com> (raw)
In-Reply-To: <94608581-10a8-4967-be6b-1842d4146223@intel.com>

Hi Reinette,

Thanks for the review.

On 29-10-2026 00:08, Reinette Chatre wrote:
> Hi Swapnil,
> 
> On 10/22/26 6:25 AM, Swapnil Sapkal wrote:
>> From: Babu Moger <babu.moger@amd.com>
>>
>> For Intel, the memory controller is called Integrated Memory Controller
>> (IMC). For AMD, it is called Unified Memory Controller (UMC).
>>
>> Rename the variables and functions from imc (Integrated Memory
>> Controller) to the generic mc (Memory Controller) in preparation for
>> the support of MBM and MBA tests on AMD.
>>
>> No functional change intended.
>>
>> Assisted-by: Claude:claude-opus-4.8
> 
> There was a decision at LPC that this tag is no longer needed. This was
> formalized with the following recent commit:
> 	1e035297ffda ("docs: remove Assisted-by references")
> 

Thank you for pointing to this.

> Please remove the "Assisted-by:" tag from all patches and instead add
> a statement to the cover letter about how AI was used during creation of
> this series.
> 

Sure, I will remove the tag and update the cover letter.

>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> Co-developed-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
>> Signed-off-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
>> ---
> 
>>   tools/testing/selftests/resctrl/mba_test.c    |  28 +-
>>   tools/testing/selftests/resctrl/mbm_test.c    |  24 +-
>>   tools/testing/selftests/resctrl/resctrl.h     |   6 +-
>>   tools/testing/selftests/resctrl/resctrl_val.c | 256 +++++++++---------
>>   4 files changed, 157 insertions(+), 157 deletions(-)
>>
> 
>> diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c
>> index 7e7d0f9cc249..c9cac957726b 100644
>> --- a/tools/testing/selftests/resctrl/resctrl_val.c
>> +++ b/tools/testing/selftests/resctrl/resctrl_val.c
> 
> ...
> 
>> @@ -83,20 +83,20 @@ static void get_read_event_and_umask(char *cas_count_cfg, struct imc_counter_con
>>   		if (!token[i])
>>   			break;
>>   		if (strcmp(token[i], "event") == 0)
>> -			imc_counter->event = strtol(token[i + 1], NULL, 16);
>> +			mc_counter->event = strtol(token[i + 1], NULL, 16);
>>   		if (strcmp(token[i], "umask") == 0)
>> -			imc_counter->umask = strtol(token[i + 1], NULL, 16);
>> +			mc_counter->umask = strtol(token[i + 1], NULL, 16);
>>   	}
>>   }
>>   
>> -static int open_perf_read_event(int cpu_no, struct imc_counter_config *imc_counter)
>> +static int open_perf_read_event(int cpu_no, struct mc_counter_config *mc_counter)
>>   {
>> -	imc_counter->fd = perf_event_open(&imc_counter->pe, -1, cpu_no, -1,
>> +	mc_counter->fd = perf_event_open(&mc_counter->pe, -1, cpu_no, -1,
>>   					  PERF_FLAG_FD_CLOEXEC);
> 
> nit: please fixup the alignment with open parenthesis
> 
>>   
>> -	if (imc_counter->fd == -1) {
>> +	if (mc_counter->fd == -1) {
>>   		fprintf(stderr, "Error opening leader %llx\n",
>> -			imc_counter->pe.config);
>> +			mc_counter->pe.config);
>>   
>>   		return -1;
>>   	}
> 
> 
> ...
> 
>> @@ -344,54 +344,54 @@ static int perf_open_imc_read_mem_bw(int cpu_no)
>>   	return 0;
>>   
>>   close_fds:
>> -	perf_close_imc_read_mem_bw();
>> +	perf_close_mc_read_mem_bw();
>>   	return -1;
>>   }
>>   
>>   /*
>> - * do_imc_read_mem_bw_test - Perform memory bandwidth test
>> + * do_mc_read_mem_bw_test - Perform memory bandwidth test
>>    *
>>    * Runs memory bandwidth test over one second period. Also, handles starting
>> - * and stopping of the IMC perf counters around the test.
>> + * and stopping of the MC perf counters around the test.
>>    */
>> -static void do_imc_read_mem_bw_test(void)
>> +static void do_mc_read_mem_bw_test(void)
>>   {
>> -	struct imc_counter_config *imc_counter;
>> +	struct mc_counter_config *mc_counter;
>>   
>> -	list_for_each_entry(imc_counter, &imc_counters_list, entry)
>> -		read_mem_bw_ioctl_perf_event_ioc_reset_enable(imc_counter);
>> +	list_for_each_entry(mc_counter, &mc_counters_list, entry)
>> +		read_mem_bw_ioctl_perf_event_ioc_reset_enable(mc_counter);
>>   
>>   	sleep(1);
>>   
>>   	/* Stop counters after a second to get results. */
>> -	list_for_each_entry(imc_counter, &imc_counters_list, entry)
>> -		read_mem_bw_ioctl_perf_event_ioc_disable(imc_counter);
>> +	list_for_each_entry(mc_counter, &mc_counters_list, entry)
>> +		read_mem_bw_ioctl_perf_event_ioc_disable(mc_counter);
>>   }
>>   
>>   /*
>> - * get_read_mem_bw_imc - Memory read bandwidth as reported by iMC counters
>> + * get_read_mem_bw_mc - Memory read bandwidth as reported by MC counters
>>    *
>>    * Memory read bandwidth utilized by a process on a socket can be calculated
>> - * using iMC counters' read events. Perf events are used to read these
>> + * using MC counters' read events. Perf events are used to read these
>>    * counters.
> 
> nit: please move this dangling "counters." to the previous line.
> 

Will update.

>>    *
>>    * Return: = 0 on success. < 0 on failure.
>>    */
>> -static int get_read_mem_bw_imc(float *bw_imc)
>> +static int get_read_mem_bw_mc(float *bw_mc)
> | Reviewed-by: Reinette Chatre <reinette.chatre@intel.com>
> 

Ack.

> Reinette
--
Thanks and Regards,
Swapnil

  reply	other threads:[~2026-11-03  6:13 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-22 13:25 [PATCH v5 0/5] selftests/resctrl: Add MBM and MBA test support for AMD Swapnil Sapkal
2026-10-22 13:25 ` [PATCH v5 1/5] selftests/resctrl: Rename variables and functions to generic names Swapnil Sapkal
2026-10-28 18:38   ` Reinette Chatre
2026-11-03  6:13     ` Swapnil Sapkal [this message]
2026-10-22 13:25 ` [PATCH v5 2/5] selftests/resctrl: Detect vendor to select memory controller sysfs name Swapnil Sapkal
2026-10-28 18:39   ` Reinette Chatre
2026-11-03  6:19     ` Swapnil Sapkal
2026-10-22 13:25 ` [PATCH v5 3/5] selftests/resctrl: Add support for MBM and MBA tests on AMD Swapnil Sapkal
2026-10-28 18:41   ` Reinette Chatre
2026-11-03  6:34     ` Swapnil Sapkal
2026-10-22 13:25 ` [PATCH v5 4/5] selftests/resctrl: Use bandwidth values for AMD MBA schemata Swapnil Sapkal
2026-10-28 18:45   ` Reinette Chatre
2026-11-03  1:15     ` Moger, Babu
2026-10-22 13:25 ` [PATCH v5 5/5] selftests/resctrl: Enable MBM and MBA tests on AMD Swapnil Sapkal
2026-10-28 18:45   ` 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=5fbcef9c-4c3f-4386-968a-01a81c67900e@amd.com \
    --to=swapnil.sapkal@amd.com \
    --cc=Dave.Martin@arm.com \
    --cc=babu.moger@amd.com \
    --cc=eranian@google.com \
    --cc=fenghua.yu@intel.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@kernel.org \
    --cc=tan.shaopeng@fujitsu.com \
    --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®