Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: "Moger, Babu" <babu.moger@amd.com>
To: Reinette Chatre <reinette.chatre@intel.com>,
	fenghua.yu@intel.com, shuah@kernel.org
Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
	ilpo.jarvinen@linux.intel.com, maciej.wieczor-retman@intel.com,
	peternewman@google.com, eranian@google.com
Subject: Re: [PATCH v3 1/4] selftests/resctrl: Rename variables and functions to generic names
Date: Thu, 20 Jun 2024 10:43:08 -0500	[thread overview]
Message-ID: <e85e6190-eea7-4010-8eb1-3f04fcce5609@amd.com> (raw)
In-Reply-To: <7cff31f8-f94f-4b76-beb9-073c369e5080@intel.com>

Hi Reinette,


On 6/14/24 13:37, Reinette Chatre wrote:
> Hi Babu,
> 
> On 6/5/24 3:45 PM, Babu Moger wrote:
>> In an effort to support MBM and MBA tests for AMD, renaming for variable
>> and functions to generic names. For Intel, the memory controller is called
> 
> Changelog usually starts with some context and then problem to be solved.
> What
> the patch does follows that. Maybe just something like:
> 
>     For Intel, the memory controller is called Integrated Memory
>     Controller (IMC). For AMD, it is called Unified Memory Controller (UMC).
>                                                                                     Change the names of variables and functions from imc to mc in preparation
>     for support of MBM and MBA tests for AMD.
>                                                                                     No functional change.

Sure.

> 
>> Integrated Memory Controllers (IMC). For AMD, it is called Unified
>> Memory Controller (UMC).
>>
>> Change the names of variables and functions from imc (Integrated memory
>> controller) to mc(Memory Controller). No functional change.
>>
>> Signed-off-by: Babu Moger <babu.moger@amd.com>
>> ---
> 
> ...
> 
>> @@ -349,10 +350,10 @@ static void do_imc_mem_bw_test(void)
>>    *
>>    * Return: = 0 on success. < 0 on failure.
>>    */
>> -static int get_mem_bw_imc(const char *bw_report, float *bw_imc)
>> +static int get_mem_bw_mc(const char *bw_report, float *bw_mc)
> 
> The name of the function is expected to be changed in the function comments
> also.

Ok.

> 
>>   {
>>       float reads, writes, of_mul_read, of_mul_write;
>> -    int imc;
>> +    int mc;
>>         /* Start all iMC counters to log values (both read and write) */
> 
> Was this intended to be MC?

Yes.

> 
>>       reads = 0, writes = 0, of_mul_read = 1, of_mul_write = 1;
>> @@ -361,21 +362,21 @@ static int get_mem_bw_imc(const char *bw_report,
>> float *bw_imc)
>>        * Get results which are stored in struct type imc_counter_config
>>        * Take overflow into consideration before calculating total
>> bandwidth.
>>        */
> 
> In below snippet imc_counter_config is renamed to mc_counter_config yet the
> comment above was not changed to match.

Will correct it.

> 
>> -    for (imc = 0; imc < imcs; imc++) {
>> -        struct imc_counter_config *r =
>> -            &imc_counters_config[imc][READ];
>> -        struct imc_counter_config *w =
>> -            &imc_counters_config[imc][WRITE];
>> +    for (mc = 0; mc < mcs; mc++) {
>> +        struct mc_counter_config *r =
>> +            &mc_counters_config[mc][READ];
>> +        struct mc_counter_config *w =
>> +            &mc_counters_config[mc][WRITE];
>>   
> 
> I noticed a couple of misses by just looking at this patch. You can
> use grep to ensure that this patch does what you intend.

Sure.--
Thanks
Babu Moger

  reply	other threads:[~2024-06-20 15:43 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-05 22:45 [PATCH v3 0/4] selftests/resctrl: Enable MBM and MBA tests on AMD Babu Moger
2024-06-05 22:45 ` [PATCH v3 1/4] selftests/resctrl: Rename variables and functions to generic names Babu Moger
2024-06-14 18:37   ` Reinette Chatre
2024-06-20 15:43     ` Moger, Babu [this message]
2024-06-05 22:45 ` [PATCH v3 2/4] selftests/resctrl: Pass sysfs controller name of the vendor Babu Moger
2024-06-14 18:38   ` Reinette Chatre
2024-06-20 16:02     ` Moger, Babu
2024-06-05 22:45 ` [PATCH v3 3/4] selftests/resctrl: Add support for MBM and MBA tests on AMD Babu Moger
2024-06-14 18:39   ` Reinette Chatre
2024-06-20 16:18     ` Moger, Babu
2024-06-05 22:45 ` [PATCH v3 4/4] selftests/resctrl: Enable MBA/MBA " Babu Moger
2024-06-14 18:39   ` Reinette Chatre
2024-06-20 19:11     ` Moger, Babu
2025-10-09  2:45 ` [PATCH v3 0/4] selftests/resctrl: Enable MBM and MBA " Shaopeng Tan (Fujitsu)
2025-10-10 15:38   ` Moger, Babu
2025-10-14  7:31     ` Shaopeng Tan (Fujitsu)

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=e85e6190-eea7-4010-8eb1-3f04fcce5609@amd.com \
    --to=babu.moger@amd.com \
    --cc=eranian@google.com \
    --cc=fenghua.yu@intel.com \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maciej.wieczor-retman@intel.com \
    --cc=peternewman@google.com \
    --cc=reinette.chatre@intel.com \
    --cc=shuah@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