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]
Date: Fri, 23 Feb 2024 13:39:05 -0600
From: "Moger, Babu" <babu.moger@....com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Cc: fenghua.yu@...el.com, Reinette Chatre <reinette.chatre@...el.com>,
 shuah@...nel.org, LKML <linux-kernel@...r.kernel.org>,
 linux-kselftest@...r.kernel.org,
 Maciej Wieczór-Retman <maciej.wieczor-retman@...el.com>,
 peternewman@...gle.com, eranian@...gle.com
Subject: Re: [PATCH 4/4] selftests/resctrl: Skip the tests if iMC/UMC counters
 are unavailable

Hi Ilpo,

On 2/23/24 04:56, Ilpo Järvinen wrote:
> On Thu, 22 Feb 2024, Babu Moger wrote:
> 
>> Older systems do not support UMC (Unified Memory Controller) perf counters.
>> Skip the tests if the system does not support UMC counters.
>>
>> Signed-off-by: Babu Moger <babu.moger@....com>
>> ---
>>  tools/testing/selftests/resctrl/resctrl.h       |  1 +
>>  tools/testing/selftests/resctrl/resctrl_tests.c | 10 ++++++++++
>>  tools/testing/selftests/resctrl/resctrl_val.c   |  4 ++--
>>  3 files changed, 13 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/testing/selftests/resctrl/resctrl.h b/tools/testing/selftests/resctrl/resctrl.h
>> index a33f414f6019..5c2556af0649 100644
>> --- a/tools/testing/selftests/resctrl/resctrl.h
>> +++ b/tools/testing/selftests/resctrl/resctrl.h
>> @@ -116,5 +116,6 @@ int show_cache_info(unsigned long sum_llc_val, int no_of_bits,
>>  		    size_t cache_span, unsigned long max_diff,
>>  		    unsigned long max_diff_percent, unsigned long num_of_runs,
>>  		    bool platform, bool cmt);
>> +int get_number_of_mem_ctrls(void);
>>  
>>  #endif /* RESCTRL_H */
>> diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c b/tools/testing/selftests/resctrl/resctrl_tests.c
>> index 231233b8d354..5423882529ec 100644
>> --- a/tools/testing/selftests/resctrl/resctrl_tests.c
>> +++ b/tools/testing/selftests/resctrl/resctrl_tests.c
>> @@ -98,6 +98,11 @@ static void run_mbm_test(const char * const *benchmark_cmd, int cpu_no)
>>  
>>  	ksft_print_msg("Starting MBM BW change ...\n");
>>  
>> +	if (get_number_of_mem_ctrls() < 0) {
>> +		ksft_test_result_skip("Unable find iMC/UMC counters!\n");
>> +		return;
>> +	}
>> +
>>  	if (test_prepare()) {
>>  		ksft_exit_fail_msg("Abnormal failure when preparing for the test\n");
>>  		return;
>> @@ -124,6 +129,11 @@ static void run_mba_test(const char * const *benchmark_cmd, int cpu_no)
>>  
>>  	ksft_print_msg("Starting MBA Schemata change ...\n");
>>  
>> +	if (get_number_of_mem_ctrls() < 0) {
>> +		ksft_test_result_skip("Unable find iMC/UMC counters!\n");
>> +		return;
>> +	}
>> +
>>  	if (test_prepare()) {
>>  		ksft_exit_fail_msg("Abnormal failure when preparing for the test\n");
>>  		return;
> 
> This also needs rebasing and adaptation to the generic test framework.

Looks like I need to wait for your patches to merge first.
Thanks
Babu Moger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ