Re: [PATCH 3/6] selftests/resctrl: Simplify benchmark parameter passing

2024-08-30 Thread Reinette Chatre
Hi Ilpo, On 8/30/24 4:13 AM, Ilpo Järvinen wrote: On Thu, 29 Aug 2024, Reinette Chatre wrote: The benchmark used during the CMT, MBM, and MBA tests can be provided by the user via (-b) parameter to the tests, if not provided the default "fill_buf" benchmark is used. The "fill

Re: [PATCH 4/6] selftests/resctrl: Use cache size to determine "fill_buf" buffer size

2024-08-30 Thread Reinette Chatre
Hi Ilpo, On 8/30/24 4:25 AM, Ilpo Järvinen wrote: On Thu, 29 Aug 2024, Reinette Chatre wrote: By default the MBM and MBA tests use the "fill_buf" benchmark to read from a buffer with the goal to measure the memory bandwidth generated by this buffer access. Care should be taken w

Re: [PATCH 5/6] selftests/resctrl: Do not compare performance counters and resctrl at low bandwidth

2024-08-30 Thread Reinette Chatre
Hi Ilpo, On 8/30/24 4:42 AM, Ilpo Järvinen wrote: On Thu, 29 Aug 2024, Reinette Chatre wrote: The MBA test incrementally throttles memory bandwidth, each time followed by a comparison between the memory bandwidth observed by the performance counters and resctrl respectively. While a

Re: [PATCH 2/6] selftests/resctrl: Ensure measurements skip initialization of default benchmark

2024-08-30 Thread Reinette Chatre
Hi Ilpo, Thank you for taking a look. On 8/30/24 3:56 AM, Ilpo Järvinen wrote: On Thu, 29 Aug 2024, Reinette Chatre wrote: ... @@ -684,11 +622,13 @@ int resctrl_val(const struct resctrl_test *test, const char * const *benchmark_cmd, struct resctrl_val_param

[PATCH 6/6] selftests/resctrl: Keep results from first test run

2024-08-29 Thread Reinette Chatre
arated the buffer prepare phase from the benchmark run phase reducing the need for the tests themselves to accommodate the benchmark's "settle" time. With these enhancements there are no remaining portions needing to "settle" and the first test run can contribute to

[PATCH 3/6] selftests/resctrl: Simplify benchmark parameter passing

2024-08-29 Thread Reinette Chatre
transformations to/from strings. Make these parameters part of the parameters associated with each test so that each test can set benchmark parameters that are appropriate for it. Signed-off-by: Reinette Chatre --- tools/testing/selftests/resctrl/cmt_test.c| 28 +++ tools/tes

[PATCH 4/6] selftests/resctrl: Use cache size to determine "fill_buf" buffer size

2024-08-29 Thread Reinette Chatre
ss while keeping the existing default as minimum that has been appropriate for testing so far. Signed-off-by: Reinette Chatre --- tools/testing/selftests/resctrl/mba_test.c | 8 +++- tools/testing/selftests/resctrl/mbm_test.c | 8 +++- 2 files changed, 14 insertions(+), 2 deletions(-)

[PATCH 5/6] selftests/resctrl: Do not compare performance counters and resctrl at low bandwidth

2024-08-29 Thread Reinette Chatre
t adequate comparison between performance counters and resctrl. Signed-off-by: Reinette Chatre --- tools/testing/selftests/resctrl/mba_test.c | 7 +++ tools/testing/selftests/resctrl/resctrl.h | 6 ++ 2 files changed, 13 insertions(+) diff --git a/tools/testing/selftests/resctrl/mba_test.

[PATCH 2/6] selftests/resctrl: Ensure measurements skip initialization of default benchmark

2024-08-29 Thread Reinette Chatre
ntime" part of the benchmark (or entire user provided benchmark). Keep the "wait one second" delay before measurements start. For the default "fill_buf" benchmark this time now covers only the "runtime" portion that needs to be measured. For the user provide

[PATCH 1/6] selftests/resctrl: Fix sparse warnings

2024-08-29 Thread Reinette Chatre
ask' was not declared. Should it be static? Signed-off-by: Reinette Chatre --- tools/testing/selftests/resctrl/resctrl_val.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/resctrl/resctrl_val.c b/tools/testing/selftests/resctrl/resctrl_val.c

[PATCH 0/6] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-08-29 Thread Reinette Chatre
l-xeon-platinum-8592-processor-320m-cache-1-9-ghz.html Reinette Chatre (6): selftests/resctrl: Fix sparse warnings selftests/resctrl: Ensure measurements skip initialization of default benchmark selftests/resctrl: Simplify benchmark parameter passing selftests/resctrl: Use cache size to

Re: [PATCH v2 3/3] kselftest: Provide __cpuid_count() stub on non-x86 archs

2024-08-26 Thread Reinette Chatre
Hi Ilpo, On 8/26/24 3:44 AM, Ilpo Järvinen wrote: On Fri, 23 Aug 2024, Reinette Chatre wrote: On 8/23/24 3:47 AM, Ilpo Järvinen wrote: On Thu, 22 Aug 2024, Reinette Chatre wrote: On 8/22/24 1:11 AM, Ilpo Järvinen wrote: Building resctrl selftest fails on ARM because it uses __cpuid_count

Re: [PATCH v2 3/3] kselftest: Provide __cpuid_count() stub on non-x86 archs

2024-08-23 Thread Reinette Chatre
Hi Ilpo, On 8/23/24 3:47 AM, Ilpo Järvinen wrote: On Thu, 22 Aug 2024, Reinette Chatre wrote: On 8/22/24 1:11 AM, Ilpo Järvinen wrote: Building resctrl selftest fails on ARM because it uses __cpuid_count() that fails the build with error: CC resctrl_tests In file included from

Re: [PATCH v2 3/3] kselftest: Provide __cpuid_count() stub on non-x86 archs

2024-08-22 Thread Reinette Chatre
Hi Ilpo, On 8/22/24 1:11 AM, Ilpo Järvinen wrote: Building resctrl selftest fails on ARM because it uses __cpuid_count() that fails the build with error: CC resctrl_tests In file included from resctrl.h:24, from cat_test.c:11: In function 'arch_supports_noncont_cat',

Re: [PATCH v2 2/3] selftests/resctrl: Always initialize ecx to avoid build warnings

2024-08-22 Thread Reinette Chatre
Hi Ilpo, On 8/22/24 1:11 AM, Ilpo Järvinen wrote: To avoid warnings when __cpuid_count() is an empty stub, always initialize ecx because it is used in the return statement. Signed-off-by: Ilpo Järvinen Reviewed-by: Muhammad Usama Anjum --- Acked-by: Reinette Chatre Reinette

Re: [PATCH v2 1/3] selftests/resctrl: Generalize non-contiguous CAT check

2024-08-22 Thread Reinette Chatre
using switch/case logic and return false for unknown vendors. Signed-off-by: Ilpo Järvinen Reviewed-by: Muhammad Usama Anjum --- Acked-by: Reinette Chatre Reinette

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-12 Thread Reinette Chatre
Hi Shuah, On 8/12/24 3:49 PM, Shuah Khan wrote: On 8/9/24 02:45, Ilpo Järvinen wrote: Adding Maciej. On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: On 8/9/24 12:23 PM, Ilpo Järvinen wrote: On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: This test doesn't have support for other architectur

Re: [PATCH v4 2/2] selftests/resctrl: Adjust SNC support messages

2024-08-12 Thread Reinette Chatre
Hi Maciej, On 7/12/24 2:04 AM, Maciej Wieczor-Retman wrote: Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check their BIOS settings. No actual check is performed before printing that message so it is not very accurate in

Re: [PATCH v4 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-08-12 Thread Reinette Chatre
Hi Maciej, On 7/12/24 2:04 AM, Maciej Wieczor-Retman wrote: Sub-NUMA Cluster divides CPUs sharing an L3 cache into separate NUMA nodes. Systems may support splitting into either two, three or four nodes. When SNC mode is enabled the effective amount of L3 cache available for allocation is divid

Re: [PATCH] selftests: resctrl: ignore builds for unsupported architectures

2024-08-12 Thread Reinette Chatre
On 8/9/24 1:45 AM, Ilpo Järvinen wrote: Adding Maciej. On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: On 8/9/24 12:23 PM, Ilpo Järvinen wrote: On Fri, 9 Aug 2024, Muhammad Usama Anjum wrote: This test doesn't have support for other architectures. Altough resctrl is supported on x86 and A

Re: [PATCH v3 2/2] selftests/resctrl: Adjust SNC support messages

2024-07-08 Thread Reinette Chatre
Hi Maciej, On 7/4/24 12:23 AM, Maciej Wieczor-Retman wrote: On 2024-07-03 at 13:51:03 -0700, Reinette Chatre wrote: On 7/3/24 12:43 AM, Maciej Wieczór-Retman wrote: On 3.07.2024 00:21, Reinette Chatre wrote: On 7/1/24 7:18 AM, Maciej Wieczor-Retman wrote: ... SNC might not be enabled at

Re: [PATCH v3 2/2] selftests/resctrl: Adjust SNC support messages

2024-07-03 Thread Reinette Chatre
Hi Maciej, On 7/3/24 12:43 AM, Maciej Wieczór-Retman wrote: On 3.07.2024 00:21, Reinette Chatre wrote: On 7/1/24 7:18 AM, Maciej Wieczor-Retman wrote: diff --git a/tools/testing/selftests/resctrl/cache.c b/tools/testing/selftests/resctrl/cache.c index 1ff1104e6575..9885d64b8a21 100644

Re: [PATCH v3 2/2] selftests/resctrl: Adjust SNC support messages

2024-07-02 Thread Reinette Chatre
Hi Maciej, On 7/1/24 7:18 AM, Maciej Wieczor-Retman wrote: Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check theirs BIOS theirs BIOS -> their BIOS? settings. No actual check is performed before printing that message

Re: [PATCH v3 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-07-02 Thread Reinette Chatre
Hi Maciej, On 7/1/24 7:18 AM, Maciej Wieczor-Retman wrote: ... +int snc_nodes_per_l3_cache(void) +{ + int node_cpus, cache_cpus, i, ret = 1; + + node_cpus = count_sys_bitmap_bits("/sys/devices/system/node/node0/cpumap"); + cache_cpus = count_sys_bitmap_bits("/sys/devices/syst

Re: [PATCH v3 2/2] selftests/resctrl: Adjust SNC support messages

2024-07-02 Thread Reinette Chatre
Hi Tony, On 7/2/24 2:46 PM, Tony Luck wrote: On Tue, Jul 02, 2024 at 02:26:25PM -0700, Reinette Chatre wrote: Hi Tony, On 7/1/24 9:04 AM, Luck, Tony wrote: +static bool cpus_offline_empty(void) +{ + char offline_cpus_str[64]; + FILE *fp; + + fp = fopen("/sys/devices/s

Re: [PATCH v3 2/2] selftests/resctrl: Adjust SNC support messages

2024-07-02 Thread Reinette Chatre
Hi Tony, On 7/1/24 9:04 AM, Luck, Tony wrote: +static bool cpus_offline_empty(void) +{ + char offline_cpus_str[64]; + FILE *fp; + + fp = fopen("/sys/devices/system/cpu/offline", "r"); Check for fp == NULL before using it. + if (fscanf(fp, "%s", offline_cpus_str) < 0) {

Re: [PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-06-27 Thread Reinette Chatre
Hi Maciej On 6/27/24 2:50 AM, Maciej Wieczor-Retman wrote: Yeah, I've been thinking about what is the best way to display these for a while. Maybe you're right that messages at the top will be lost. What about this set of messages: 1. First run of run_single_test() 1.1. For all tests:

Re: [PATCH v3] selftests/resctrl: Fix non-contiguous CBM for AMD

2024-06-26 Thread Reinette Chatre
On 6/26/24 12:25 PM, Shuah Khan wrote: Applied to linux-kselftest fixes branch for 6.10-rc6 Thank you very much Shuah. Reinette

Re: [PATCH v3] selftests/resctrl: Fix non-contiguous CBM for AMD

2024-06-26 Thread Reinette Chatre
l: Add non-contiguous CBMs CAT test") Signed-off-by: Babu Moger Reviewed-by: Reinette Chatre --- v3: Reworked changelong. v2: Moved the non-contiguous CBM verification to a new function arch_supports_noncont_cat. v1: This was part of the series https://lore.kernel.org/lkml/cove

Re: [PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-06-26 Thread Reinette Chatre
Hi Maciej, On 6/26/24 12:09 AM, Maciej Wieczor-Retman wrote: Hello!, On 2024-06-25 at 09:28:55 -0700, Reinette Chatre wrote: Hi Maciej, On 6/25/24 4:04 AM, Maciej Wieczor-Retman wrote: Hello, sorry it took me so long to get back to this. I prepared the next version with your comments

Re: [PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-06-25 Thread Reinette Chatre
efore posting: On 2024-05-30 at 16:07:29 -0700, Reinette Chatre wrote: On 5/15/24 4:18 AM, Maciej Wieczor-Retman wrote: + return 1; + } + + for (i = 1; i <= MAX_SNC ; i++) { + if (i * node_cpus >= cache_cpus) + return i; +

Re: [PATCH v7 00/16] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-06-21 Thread Reinette Chatre
On 6/18/24 4:44 PM, Shuah Khan wrote: On 6/10/24 09:14, Ilpo Järvinen wrote: Hi all, This series does a number of cleanups into resctrl_val() and generalizes it by removing test name specific handling from the function. v7: - Truly use "bound to", not bounded to. - Fix separator to use 3 da

Re: [PATCH v3 4/4] selftests/resctrl: Enable MBA/MBA tests on AMD

2024-06-14 Thread Reinette Chatre
Hi Babu, On 6/5/24 3:45 PM, Babu Moger wrote: Enable MBA/MBM tests if UMC (Unified Memory Controller) support is available on the system. Tests will be skipped otherwise. Could you please point out where the test is skipped if UMC is not available? Reinette

Re: [PATCH v3 3/4] selftests/resctrl: Add support for MBM and MBA tests on AMD

2024-06-14 Thread Reinette Chatre
Hi Babu, On 6/5/24 3:45 PM, Babu Moger wrote: Add support to read UMC (Unified Memory Controller) perf events to compare the numbers with QoS monitor for AMD. Signed-off-by: Babu Moger --- v3: Made read_from_mc_dir function generic to both AMD and Intel. Rest are mostly related to rebase.

Re: [PATCH v3 2/4] selftests/resctrl: Pass sysfs controller name of the vendor

2024-06-14 Thread Reinette Chatre
Hi Babu, Subject and changelog mentions how controller name is "passed" but the patch does not seem to "pass" anything new. On 6/5/24 3:45 PM, Babu Moger wrote: The test detects number of memory controllers by looking at the sysfs file system. Detect the vendor to pass the controller name appro

Re: [PATCH v3 1/4] selftests/resctrl: Rename variables and functions to generic names

2024-06-14 Thread Reinette Chatre
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 follow

Re: [PATCH v2] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-11 Thread Reinette Chatre
On 6/10/24 4:11 PM, Moger, Babu wrote: Hi Reinette, On 6/10/2024 4:32 PM, Reinette Chatre wrote: Hi Babu, (please do not send new version of patch in response to previous version) Yes. I saw your comments on other thread. I will take care of it. ... and yet you proceed to send v3 in

Re: [PATCH v7 00/16] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-06-10 Thread Reinette Chatre
Hi Shuah, Could you please consider this series for inclusion? Thank you very much. Reinette On 6/10/24 8:14 AM, Ilpo Järvinen wrote: Hi all, This series does a number of cleanups into resctrl_val() and generalizes it by removing test name specific handling from the function. v7: - Truly us

Re: [PATCH v2] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-10 Thread Reinette Chatre
eviewed-by: Reinette Chatre Reinette

Re: [PATCH v2] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-10 Thread Reinette Chatre
Hi Babu, On 6/10/24 10:51 AM, Moger, Babu wrote: Hi On 6/10/24 11:20, Ilpo Järvinen wrote: On Mon, 10 Jun 2024, Babu Moger wrote: The selftest noncont_cat_run_test fails on AMD with the warnings. Reason noncont_cat_run_test() I want to mention the test here. not function. How about this?

Re: [PATCH] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-07 Thread Reinette Chatre
Hi Babu, On 6/7/24 11:16 AM, Moger, Babu wrote: On 6/6/2024 6:58 PM, Reinette Chatre wrote: On 6/6/24 4:09 PM, Moger, Babu wrote: @@ -301,15 +320,8 @@ static int noncont_cat_run_test(const struct resctrl_test *test, if (ret) return ret; -   if (!strcmp(test

Re: [PATCH v6 15/16] selftests/resctrl: Remove mongrp from CMT test

2024-06-07 Thread Reinette Chatre
unnecessary monitor group from the CMT selftest. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger Reviewed-by: Reinette Chatre -- "--" -> "---" to prevent snippet below from being included in changelog. Reinette

Re: [PATCH v6 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-06-07 Thread Reinette Chatre
closely matching that of the IMC perf counters to improve measurement accuracy. For the second read after rewind() to return a fresh value, also newline has to be consumed by the fscanf(). Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen Tested-by: Babu Moger --- v6: - Adjust closing

Re: [PATCH] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-06 Thread Reinette Chatre
Hi Babu, On 6/6/24 4:09 PM, Moger, Babu wrote: Hi Reinette, On 6/6/2024 3:33 PM, Reinette Chatre wrote: Hi Babu, On 6/5/24 2:36 PM, Babu Moger wrote: The selftest noncont_cat_run_test fails on AMD with the warnings. Reason is, AMD supports non contiguous CBM masks but does not report it

Re: [PATCH] selftests/resctrl: Fix noncont_cat_run_test for AMD

2024-06-06 Thread Reinette Chatre
Hi Babu, On 6/5/24 2:36 PM, Babu Moger wrote: The selftest noncont_cat_run_test fails on AMD with the warnings. Reason is, AMD supports non contiguous CBM masks but does not report it via CPUID. Update noncont_cat_run_test to check for the vendor when verifying CPUID. Fixes: ae638551ab64 ("sel

Re: [PATCH v5 16/16] selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl()

2024-05-31 Thread Reinette Chatre
-by: Reinette Chatre Reinette

Re: [PATCH v5 13/16] selftests/resctrl: Convert ctrlgrp & mongrp to pointers

2024-05-31 Thread Reinette Chatre
ts success" -> "always results in success"? With changelog and comment fixups addressed: | Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v5 05/16] selftests/resctrl: Use correct type for pids

2024-05-31 Thread Reinette Chatre
allow using a longer integer type but generalizing for that would complicate the code unnecessarily, the selftest code does not need to be portable). Signed-off-by: Ilpo Järvinen --- Thank you. Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v5 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-05-31 Thread Reinette Chatre
closely matching that of the IMC perf counters to improve measurement accuracy. For the second read after rewind() to return a fresh value, also newline has to be consumed by the fscanf(). Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen --- v5: - Open mem bw file once and use rewind

Re: [PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-05-31 Thread Reinette Chatre
Hi Tony and Maciej, On 5/30/24 5:34 PM, Luck, Tony wrote: When SNC mode is enabled the effective amount of L3 cache available for allocation is divided by the number of nodes per L3. This was a mistake in original implementation and no longer done. My original kernel code adjusted value re

Re: [PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-05-30 Thread Reinette Chatre
Hi Tony, On 5/30/24 4:46 PM, Luck, Tony wrote: When SNC mode is enabled the effective amount of L3 cache available for allocation is divided by the number of nodes per L3. This was a mistake in original implementation and no longer done. My original kernel code adjusted value reported in the

Re: [PATCH v2 2/2] selftests/resctrl: Adjust SNC support messages

2024-05-30 Thread Reinette Chatre
Hi Maciej, On 5/15/24 4:18 AM, Maciej Wieczor-Retman wrote: Resctrl selftest prints a message on test failure that Sub-Numa Clustering (SNC) could be enabled and points the user to check theirs BIOS settings. No actual check is performed before printing that message so it is not very accurate in

Re: [PATCH v2 1/2] selftests/resctrl: Adjust effective L3 cache size with SNC enabled

2024-05-30 Thread Reinette Chatre
Hi Maciej, Regarding shortlog: L3 cache size should no longer be adjusted when SNC is enabled. You mention that the tests are passing when running with this adjustment ... I think that this may be because the test now just runs on a smaller portion of the cache? On 5/15/24 4:18 AM, Maciej Wieczo

Re: [PATCH v4 14/16] selftests/resctrl: Remove mongrp from MBA test

2024-05-30 Thread Reinette Chatre
Hi Ilpo, On 5/30/24 4:56 AM, Ilpo Järvinen wrote: On Wed, 29 May 2024, Reinette Chatre wrote: On 5/20/24 5:30 AM, Ilpo Järvinen wrote: Nothing during MBA test uses mongrp even if it has been defined ever since the introduction of the MBA test in the commit 01fee6b4d1f9 ("selftests/re

Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-05-30 Thread Reinette Chatre
Hi Ilpo, On 5/30/24 4:11 AM, Ilpo Järvinen wrote: On Tue, 28 May 2024, Reinette Chatre wrote: On 5/28/24 3:19 AM, Ilpo Järvinen wrote: On Fri, 24 May 2024, Ilpo Järvinen wrote: On Fri, 24 May 2024, Reinette Chatre wrote: On 5/24/24 12:57 AM, Ilpo Järvinen wrote: On Thu, 23 May 2024

Re: [PATCH v4 16/16] selftests/resctrl: Remove test name comparing from write_bm_pid_to_resctrl()

2024-05-29 Thread Reinette Chatre
Hi Ilpo, On 5/20/24 5:30 AM, Ilpo Järvinen wrote: write_bm_pid_to_resctrl() uses resctrl_val to check test name which is not a good interface generic resctrl FS functions should provide. Only MBM and CMT tests define mongrp so the test name check in write_bm_pid_to_resctrl() can be changed to d

Re: [PATCH v4 15/16] selftests/resctrl: Remove mongrp from CMT test

2024-05-29 Thread Reinette Chatre
ide monitoring too. Remove the unnecessary monitor group from the CMT selftest. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen -- With typo fixed: | Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 14/16] selftests/resctrl: Remove mongrp from MBA test

2024-05-29 Thread Reinette Chatre
mongrp = "m1", .filename = RESULT_FILE_NAME, .init = mba_init, .setup = mba_setup, This may explain the unexpected checks that are removed in final patch? Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 13/16] selftests/resctrl: Convert ctrlgrp & mongrp to pointers

2024-05-29 Thread Reinette Chatre
Hi Ilpo, On 5/20/24 5:30 AM, Ilpo Järvinen wrote: The struct resctrl_val_param has control and monitor groups as char arrays but they are not supposed to be mutated within resctrl_val(). Convert the ctrlgrp and mongrp char array within resctrl_val_param to plain const char pointers and adjust t

Re: [PATCH v4 10/16] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-05-29 Thread Reinette Chatre
oid initialize_mem_bw_resctrl(const struct resctrl_val_param *param, + int domain_id) { sprintf(mbm_total_path, CON_MBM_LOCAL_BYTES_PATH, RESCTRL_PATH, - ctrlgrp, domain_id); + param->ctrlgrp, domain_id); } With typo fixed: | Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 12/16] selftests/resctrl: Make some strings passed to resctrlfs functions const

2024-05-29 Thread Reinette Chatre
Hi Ilpo, On 5/20/24 5:30 AM, Ilpo Järvinen wrote: Control group, monitor group and resctrl_val are not mutated and should not be mutated within resctrlfs.c functions. Mark this by using const char * for the arguments. Signed-off-by: Ilpo Järvinen --- Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 11/16] selftests/resctrl: Simplify bandwidth report type handling

2024-05-29 Thread Reinette Chatre
the report types inside measure_mem_bw(), not in resctrl_val(). - As resctrl_val() no longer needs bw_report for anything, it can just be passed to measure_mem_bw() by the ->measure() hooks. Needs imperative tone Signed-off-by: Ilpo Järvinen --- Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 09/16] selftests/resctrl: Add ->measure() callback to resctrl_val_param

2024-05-29 Thread Reinette Chatre
to allow each test to provide necessary code as a function which simplifies what resctrl_val() has to do. Signed-off-by: Ilpo Järvinen --- Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 08/16] selftests/resctrl: Simplify mem bandwidth file code for MBA & MBM tests

2024-05-29 Thread Reinette Chatre
memory bandwidth file used to the one used by the MBA selftest. Remove all unused branches opening other files to simplify the code. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen --- fyi ... if the write_bm_pid_to_resctrl() fix in patch #16 was closer to this change it would have made

Re: [PATCH v4 07/16] selftests/resctrl: Rename measure_vals() to measure_mem_bw_vals() & document

2024-05-29 Thread Reinette Chatre
pid); + ret = measure_mem_bw(uparams, param, bm_pid); if (ret) break; } else if (!strncmp(resctrl_val, CMT_STR, sizeof(CMT_STR))) { With typos fixed: | Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 06/16] selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope

2024-05-29 Thread Reinette Chatre
ich helps to make the call signatures of measure_val() and measure_llc_resctrl() more similar to each other. measure_val() -> measure_vals() (in two places above) Signed-off-by: Ilpo Järvinen --- With typos fixed: | Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 05/16] selftests/resctrl: Use correct type for pids

2024-05-29 Thread Reinette Chatre
Hi Ilpo, On 5/20/24 5:30 AM, Ilpo Järvinen wrote: A few functions receive PIDs through int arguments. PIDs variables should be of type pid_t, not int. Convert pid arguments from int to pid_t. This looks good to me. A couple of places remain that treat pid_t as int ... that is via the %d form

Re: [PATCH v4 04/16] selftests/resctrl: Consolidate get_domain_id() into resctrl_val()

2024-05-29 Thread Reinette Chatre
purpose than determining the domain ID. Consolidate determining the domain ID into resctrl_val() and pass the domain ID instead of CPU ID to initialize_mem_bw_resctrl() and initialize_llc_occu_resctrl(). Signed-off-by: Ilpo Järvinen --- Thank you. Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 03/16] selftests/resctrl: Make "bandwidth" consistent in comments & prints

2024-05-29 Thread Reinette Chatre
t; "overflow" on a line that is touched by the change. Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen --- Thank you. Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 01/16] selftests/resctrl: Fix closing IMC fds on error and open-code R+W instead of loops

2024-05-29 Thread Reinette Chatre
add a function to close() IMC fds properly in all cases. Fixes: 7f4d257e3a2a ("selftests/resctrl: Add callback to start a benchmark") Suggested-by: Reinette Chatre Signed-off-by: Ilpo Järvinen --- Thank you. Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-05-28 Thread Reinette Chatre
Hi Ilpo, On 5/28/24 3:19 AM, Ilpo Järvinen wrote: On Fri, 24 May 2024, Ilpo Järvinen wrote: On Fri, 24 May 2024, Reinette Chatre wrote: On 5/24/24 12:57 AM, Ilpo Järvinen wrote: On Thu, 23 May 2024, Reinette Chatre wrote: On 5/20/24 5:30 AM, Ilpo Järvinen wrote: For MBM/MBA tests

Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-05-24 Thread Reinette Chatre
Hi Ilpo, On 5/24/24 12:57 AM, Ilpo Järvinen wrote: On Thu, 23 May 2024, Reinette Chatre wrote: On 5/20/24 5:30 AM, Ilpo Järvinen wrote: For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs the measurement over a duration of sleep(1) call. The memory bandwidth numbers from

Re: [PATCH v4 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-05-23 Thread Reinette Chatre
Hi Ilpo, On 5/20/24 5:30 AM, Ilpo Järvinen wrote: For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs the measurement over a duration of sleep(1) call. The memory bandwidth numbers from IMC are derived over this duration. The resctrl FS derived memory bandwidth, however, is ca

Re: [PATCH v3 50/68] selftests/resctrl: Drop duplicate -D_GNU_SOURCE

2024-05-09 Thread Reinette Chatre
Hi Edward, On 5/9/2024 12:58 PM, Edward Liaw wrote: > -D_GNU_SOURCE can be de-duplicated here, as it is added by lib.mk. > > Reviewed-by: John Hubbard > Reviewed-by: Muhammad Usama Anjum > Signed-off-by: Edward Liaw > --- Thank you very much. Acked-by: Reinette Chatre Reinette

Re: [PATCH v2 4/4] selftests/resctrl: Enable MBA/MBA tests on AMD

2024-05-09 Thread Reinette Chatre
On 4/26/2024 12:06 AM, Ilpo Järvinen wrote: > On Thu, 25 Apr 2024, Babu Moger wrote: > >> Enable MBA/MBM tests if UMC (Unified Memory Controller) support is >> available on the system. Tests will be skipped otherwise. >> >> Update noncont_cat_run_test to check for vendor. AMD supports >> non co

Re: [PATCH v2 3/4] selftests/resctrl: Add support for MBM and MBA tests on AMD

2024-05-09 Thread Reinette Chatre
Hi Babu, On 4/25/2024 1:17 PM, Babu Moger wrote: > Add support to read UMC (Unified Memory Controller) perf events to compare > the numbers with QoS monitor for AMD. > > Signed-off-by: Babu Moger > --- > tools/testing/selftests/resctrl/resctrl_val.c | 67 --- > 1 file changed, 5

Re: [PATCH v2 2/4] selftests/resctrl: Pass sysfs controller name of the vendor

2024-05-09 Thread Reinette Chatre
Hi Babu, On 4/25/2024 1:17 PM, Babu Moger wrote: > Detect the vendor and pass the sysfs name for the vendor for searching > the controller information. Could you please write a proper changelog? > > Signed-off-by: Babu Moger > --- > tools/testing/selftests/resctrl/resctrl_val.c | 16 +

Re: [PATCH v2 1/4] selftests/resctrl: Rename variable imcs and num_of_imcs() to generic names

2024-05-09 Thread Reinette Chatre
Hi Babu, On 4/25/2024 1:16 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 > Integrated Memory Controllers (IMC). For AMD, it is called Unified > Memory Controller (UMC). N

Re: [PATCH v2 0/4] selftests/resctrl: Enable MBM and MBA tests on AMD

2024-05-09 Thread Reinette Chatre
Hi Babu, On 4/25/2024 1:16 PM, Babu Moger wrote: > > The MBM (Memory Bandwidth Monitoring) and MBA (Memory Bandwidth Allocation) > features are not enabled for AMD systems. The reason was lack of perf > counters to compare the resctrl test results. > > Starting with the commit > 25e56847821f ("p

Re: [PATCH v3] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-08 Thread Reinette Chatre
egers are involved, and > > b) Change to use signed integer data types, in places where subtraction >is used (and could end up with negative values). > > c) Remove a duplicate abs() call in cmt_test.c. > > Cc: Reinette Chatre > Cc: Ilpo Järvinen > Signed-off-by: John Hubb

Re: [PATCH v2] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-07 Thread Reinette Chatre
Hi John, On 5/7/2024 6:25 PM, John Hubbard wrote: > On 5/7/24 6:21 PM, Reinette Chatre wrote: >> Hi John, > ... >> >> The following (what was in v1) looks good to me. What am I missing? >> >> diff --git a/tools/testing/selftests/resctrl/cmt_test.c >> b/

Re: [PATCH v2] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-07 Thread Reinette Chatre
Hi John, On 5/7/2024 6:16 PM, John Hubbard wrote: > On 5/7/24 3:30 PM, Reinette Chatre wrote: > ... >>> diff --git a/tools/testing/selftests/resctrl/cmt_test.c >>> b/tools/testing/selftests/resctrl/cmt_test.c >>> index a81f91222a89..af33abd1cca7 100644 >>

Re: [PATCH v2] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-07 Thread Reinette Chatre
e signed integer data types, in places where subtraction >is used (and could end up with negative values). > > [1] > https://lore.kernel.org/all/20240329-selftests-libmk-llvm-rfc-v1-1-2f9ed7d1c...@valentinobst.de/ > [2] https://lore.kernel.org/all/20240503021712.78601-1-jhubb.

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread Reinette Chatre
Hi John, On 5/3/2024 12:12 PM, John Hubbard wrote: > On 5/3/24 11:37 AM, Reinette Chatre wrote: >> On 5/3/2024 9:52 AM, John Hubbard wrote: >>> On 5/3/24 1:00 AM, Ilpo Järvinen wrote: >>>> On Thu, 2 May 2024, John Hubbard wrote: >>> ... >>>

Re: [PATCH] selftests/resctrl: fix clang build failure: use LOCAL_HDRS

2024-05-03 Thread Reinette Chatre
ftests/resctrl: Add resctrl.h into build deps") > Cc: Ilpo Järvinen > Signed-off-by: John Hubbard > --- Thank you. Acked-by: Reinette Chatre Reinette

Re: [PATCH] selftests/resctrl: fix clang build warnings related to abs(), labs() calls

2024-05-03 Thread Reinette Chatre
On 5/3/2024 9:52 AM, John Hubbard wrote: > On 5/3/24 1:00 AM, Ilpo Järvinen wrote: >> On Thu, 2 May 2024, John Hubbard wrote: > ... >>> diff --git a/tools/testing/selftests/resctrl/mbm_test.c >>> b/tools/testing/selftests/resctrl/mbm_test.c >>> index d67ffa3ec63a..c873793d016d 100644 >>> --- a/

Re: [PATCH v3 00/16] selftests/resctrl: resctrl_val() related cleanups & improvements

2024-04-24 Thread Reinette Chatre
Hi Shuah and Ilpo, On 4/24/2024 6:49 AM, Shuah Khan wrote: > On 4/8/24 10:32, Ilpo Järvinen wrote: >> Hi all, >> >> This series does a number of cleanups into resctrl_val() and >> generalizes it by removing test name specific handling from the >> function. >> >> One of the changes improves MBA/MBM

Re: [PATCH v3 11/16] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > The struct resctrl_val_param is there to customize behavior inside > resctrl_val() which is currently not used to full extent and there are > number of strcmp()s for test name in resctrl_val done by resctrl_val(). > > Create ->init() hook into

Re: [PATCH v3 02/16] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > For MBM/MBA tests, measure_vals() calls get_mem_bw_imc() that performs > the measurement over a duration of sleep(1) call. The memory bandwidth > numbers from IMC are derived over this duration. The resctrl FS derived > memory bandwidth, however

Re: [PATCH v3 09/16] selftests/resctrl: Simplify mem bandwidth file code for MBA & MBM tests

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > initialize_mem_bw_resctrl() and set_mbm_path() contain complicated set > of conditions, each yielding different file to be opened to measure > memory bandwidth through resctrl FS. In practice, only two of them are > used. For MBA test, ctrlgrp i

Re: [PATCH v3 07/16] selftests/resctrl: Cleanup bm_pid and ppid usage & limit scope

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > 'bm_pid' and 'ppid' are global variables. As they are used by different > processes and in signal handler, they cannot be entirely converted into > local variables. > > The scope of those variables can still be reduced into resctrl_val.c > only

Re: [PATCH v3 01/16] selftests/resctrl: Open get_mem_bw_imc() fd for loops

2024-04-24 Thread Reinette Chatre
Hi Ilpo, On 4/8/2024 9:32 AM, Ilpo Järvinen wrote: > get_mem_bw_imc() handles fds in a for loop but close() is based on two > fixed indexes READ and WRITE. > > Open code all for loops to READ+WRITE entries for clarity. > > Suggested-by: Reinette Chatre > Signed-

Re: selftests: resctrl: cat_test.c: In function 'noncont_cat_run_test': ../kselftest.h:74:9: error: impossible constraint in 'asm' 74 | __asm__ __volatile__ ("cpuid\n\t"

2024-04-18 Thread Reinette Chatre
On 4/18/2024 2:37 AM, Naresh Kamboju wrote: > The Linux next building selftests with gcc-13 found these build warnings > and errors. > > Reported-by: Linux Kernel Functional Testing > > Build log: > - > Path: > selftests/resctrl/resctrl_tests/ > > In file included from resctrl.h:24,

Re: [PATCH v5 0/3] selftests/resctrl: Simplify test cleanup functions

2024-03-28 Thread Reinette Chatre
Hi Shuah, On 3/28/2024 12:25 PM, Shuah Khan wrote: > On 3/27/24 17:08, Reinette Chatre wrote: >> On 2/27/2024 8:36 AM, Reinette Chatre wrote: >>> Could you please consider this series for inclusion? I do admit that >>> there has been a lot of resctrl selftest work rece

Re: [PATCH v5 0/3] selftests/resctrl: Simplify test cleanup functions

2024-03-27 Thread Reinette Chatre
Hi Shuah, On 2/27/2024 8:36 AM, Reinette Chatre wrote: > Hi Shuah, > > Could you please consider this series for inclusion? I do admit that > there has been a lot of resctrl selftest work recently. This should be > it for a while as new work is still being worked on. > >

Re: [PATCH v2 11/13] selftests/resctrl: Convert ctrlgrp & mongrp to pointers

2024-03-22 Thread Reinette Chatre
Hi Ilpo, On 3/22/2024 5:30 AM, Ilpo Järvinen wrote: > On Wed, 20 Mar 2024, Reinette Chatre wrote: >> On 3/11/2024 6:52 AM, Ilpo Järvinen wrote: >>> The struct resctrl_val_param has control and monitor groups as char >>> arrays but they are not supposed to be

Re: [PATCH v2 02/13] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-03-22 Thread Reinette Chatre
Hi Ilpo, On 3/22/2024 5:11 AM, Ilpo Järvinen wrote: > On Tue, 19 Mar 2024, Reinette Chatre wrote: >> On 3/11/2024 6:52 AM, Ilpo Järvinen wrote: >>> -static int get_mem_bw_imc(int cpu_no, char *bw_report, float *bw_imc) >>> +static int perf_open_imc_mem_bw(int cpu_no)

Re: [PATCH v2 11/13] selftests/resctrl: Convert ctrlgrp & mongrp to pointers

2024-03-20 Thread Reinette Chatre
Hi Ilpo, On 3/11/2024 6:52 AM, Ilpo Järvinen wrote: > The struct resctrl_val_param has control and monitor groups as char > arrays but they are not supposed to be mutated within resctrl_val(). > > Convert the ctrlgrp and mongrp char array within resctrl_val_param to > plain const char pointers an

Re: [PATCH v2 08/13] selftests/resctrl: Add ->init() callback into resctrl_val_param

2024-03-19 Thread Reinette Chatre
Hi Ilpo, On 3/11/2024 6:52 AM, Ilpo Järvinen wrote: > The struct resctrl_val_param is there to customize behavior inside > resctrl_val() which is currently not used to full extent and there are > number of strcmp()s for test name in resctrl_val done by resctrl_val(). > > Create ->init() hook into

Re: [PATCH v2 02/13] selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1) only

2024-03-19 Thread Reinette Chatre
ndwidth section covers much shorter duration > closely matching that of the IMC perf counters to improve measurement > accuracy. > Thank you very much for doing this. > Suggested-by: Reinette Chatre > Signed-off-by: Ilpo Järvinen > --- > tools/testing/selftests/resctrl/

  1   2   3   >