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
the 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

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

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
ccess" -> "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: [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

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

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

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

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

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
ram 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
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

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
and 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

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

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,

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).

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

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

2024-05-08 Thread Reinette Chatre
ange 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 Hubbard > --- > tools/testing/selfte

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
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...@nvidia.com/ > > Cc: Reinette Chatre

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
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 >>> ---

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

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,

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

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 >

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

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

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

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/

Re: [PATCH v2 01/13] selftests/resctrl: Convert get_mem_bw_imc() fd close to for loop

2024-03-19 Thread Reinette Chatre
Hi Ilpo, On 3/11/2024 6:52 AM, Ilpo Järvinen wrote: > The open() side handles fds in a for loop but close() is based on two > fixed indexes READ and WRITE. > > Match the close() side with the open() side by using for loop for > consistency. I find the close() side to be more appropriate. I say

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

2024-03-18 Thread Reinette Chatre
Hi Tony, On 3/18/2024 3:00 PM, Luck, Tony wrote: >> Perhaps ... in this case it may make things easier to understand if >> those "mon_NODE_*" directories are sub-directories of the appropriate >> "mon_L3_*" directories. > > Reinette, > > Like this? > > $ tree mon_data/ > mon_data/ > ├──

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

2024-03-18 Thread Reinette Chatre
On 3/18/2024 2:04 PM, Luck, Tony wrote: >>> What is the use case for needing to expose the individual cluster counts? >>> What if >>> resctrl just summed the cluster counts and presented the data as before - >>> per L3 >>> cache instance? I doubt that resctrl would be what applications would

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

2024-03-18 Thread Reinette Chatre
Hi Tony, On 3/18/2024 1:47 PM, Luck, Tony wrote: >> What is the use case for needing to expose the individual cluster counts? >> What if >> resctrl just summed the cluster counts and presented the data as before - >> per L3 >> cache instance? I doubt that resctrl would be what applications

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

2024-03-18 Thread Reinette Chatre
Hi Tony, On 3/18/2024 12:34 PM, Luck, Tony wrote: While that is in some ways a more accurate view, it breaks a lot of legacy monitoring applications that expect the "L3" names. >>> >>> True - but the behaviour is different from a non SNC system, if this >>> software can read the >>>

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

2024-03-18 Thread Reinette Chatre
On 3/15/2024 11:02 AM, James Morse wrote: > On 08/03/2024 18:42, Tony Luck wrote: >> On Fri, Mar 08, 2024 at 06:06:45PM +, James Morse wrote: >>> Hi guys, >>> >>> On 07/03/2024 23:16, Tony Luck wrote: >>>> On Thu, Mar 07, 2024 at 02:39:08

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

2024-03-07 Thread Reinette Chatre
Hi Tony, On 3/7/2024 3:16 PM, Tony Luck wrote: > On Thu, Mar 07, 2024 at 02:39:08PM -0800, Reinette Chatre wrote: >> Thank you for the example. I find that significantly easier to >> understand than a single number in a generic "nodes_per_l3_cache". >> Espe

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

2024-03-07 Thread Reinette Chatre
Hi Tony, On 3/7/2024 1:14 PM, Luck, Tony wrote: >> Thinking about it even differently. The goal is to give information >> to userspace so we need to think about what would help user space? >> For example, what if there is a file in info that shows >> which CPUs are associated with each domain? >

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

2024-03-07 Thread Reinette Chatre
Hi Tony, On 3/7/2024 9:57 AM, Luck, Tony wrote: >>> SNC2 enabled: >>> >>> $ cat /sys/fs/resctrl/info/L3_mon/ snc_nodes_per_l3_cache >>> 2 >>> >> >> This would be useful. I believe "SNC" is architecture specific? >> What if the file always exists and is named "nodes_per_l3_cache"? >> >> I assume

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

2024-03-07 Thread Reinette Chatre
Hi Tony, On 3/7/2024 9:18 AM, Luck, Tony wrote: >>> If so, what should it be named? "snc_ways" as a kernel variable was >>> later replaced by "snc_nodes_per_l3_cache". Is that a good filename? >> >> "snc_nodes_per_l3_cache" seems okay to me. >> >> And I understand that the file content would show

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

2024-02-27 Thread Reinette Chatre
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. Thank you very much. Reinette On 2/26/2024 11:21 PM, Maciej Wieczor-Retman wrote: >

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

2024-02-26 Thread Reinette Chatre
ext at ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test") With this addressed, for the whole series: Reviewed-by: Reinette Chatre Thank you very much. Reinette

Re: [PATCH v6 0/5] selftests/resctrl: Add non-contiguous CBMs in Intel CAT selftest

2024-02-23 Thread Reinette Chatre
Hi Shuah, On 2/23/2024 2:37 PM, Shuah Khan wrote: > Okay ran a quick test. Why does this test leave "/sys/fs/resctrl" > mounted when it exits. Can we fix this to unmount before the test > exits? This is unexpected. The test should unmount resctrl when done and I am not able to reproduce what you

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

2024-02-23 Thread Reinette Chatre
Hi Babu, On 2/23/2024 11:47 AM, Moger, Babu wrote: > On 2/23/24 13:30, Moger, Babu wrote: >> On 2/23/24 04:53, Ilpo Järvinen wrote: >>> On Thu, 22 Feb 2024, Babu Moger wrote: @@ -131,8 +130,7 @@ static void run_mba_test(const char * const *benchmark_cmd, int cpu_no) }

Re: [PATCH v6 0/5] selftests/resctrl: Add non-contiguous CBMs in Intel CAT selftest

2024-02-23 Thread Reinette Chatre
On 2/23/2024 2:29 PM, Shuah Khan wrote: > > Applied to linux-ksefltest next for Linux 6.9-rc1 > Thank you very much Shuah. Reinette

Re: [PATCH v3 3/3] selftests/resctrl: Move cleanups out of individual tests

2024-02-23 Thread Reinette Chatre
Hi Maciej, On 2/22/2024 4:07 AM, Maciej Wieczor-Retman wrote: > diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c > b/tools/testing/selftests/resctrl/resctrl_tests.c > index 161f5365b4f0..bae08d1221ec 100644 > --- a/tools/testing/selftests/resctrl/resctrl_tests.c > +++

Re: [PATCH v3 2/3] selftests/resctrl: Simplify cleanup in ctrl-c handler

2024-02-23 Thread Reinette Chatre
Hi Maciej, On 2/22/2024 4:07 AM, Maciej Wieczor-Retman wrote: } > diff --git a/tools/testing/selftests/resctrl/resctrl_val.c > b/tools/testing/selftests/resctrl/resctrl_val.c > index 5a49f07a6c85..0134aa2f896a 100644 > --- a/tools/testing/selftests/resctrl/resctrl_val.c > +++

Re: [PATCH v6 0/5] selftests/resctrl: Add non-contiguous CBMs in Intel CAT selftest

2024-02-22 Thread Reinette Chatre
Hi Shuah, Could you please consider this series for inclusion? Thank you very much. Reinette On 2/16/2024 12:34 AM, Maciej Wieczor-Retman wrote: > Non-contiguous CBM support for Intel CAT has been merged into the kernel > with Commit 0e3cd31f6e90 ("x86/resctrl: Enable non-contiguous CBMs in >

Re: [PATCH v6 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-02-20 Thread Reinette Chatre
directory. > > Signed-off-by: Maciej Wieczor-Retman > Reviewed-by: Ilpo Järvinen > --- Thank you. Reviewed-by: Reinette Chatre Reinettte

Re: [PATCH v6 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-20 Thread Reinette Chatre
Signed-off-by: Maciej Wieczor-Retman > --- Thank you. Reviewed-by: Reinette Chatre Reinette

Re: resctrl selftests ready for inclusion

2024-02-13 Thread Reinette Chatre
Hi Shuah, On 2/13/2024 11:02 AM, Shuah wrote: > On 2/8/24 13:10, Reinette Chatre wrote: >> Hi Shuah, >> >> On 1/22/2024 10:06 AM, Reinette Chatre wrote: >>> Could you please consider Ilpo's resctrl selftest enhancements [1] >>> for inclusion into k

Re: [PATCH v5 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-12 Thread Reinette Chatre
Hi Maciej, On 2/11/2024 11:38 PM, Maciej Wieczor-Retman wrote: > Sure, I guess I could make the check 'if (bit_center < 3)' to also check if > the > full_cache_mask isn't too short for some reason (since later 2 is substracted > from bit_center for the 'hole' bit shift). Thank you. > Or would

Re: [PATCH v5 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-09 Thread Reinette Chatre
Hi Maciej, On 2/9/2024 6:02 AM, Maciej Wieczor-Retman wrote: ... > diff --git a/tools/testing/selftests/resctrl/cat_test.c > b/tools/testing/selftests/resctrl/cat_test.c > index 39fc9303b8e8..d4b7bf8a6780 100644 > --- a/tools/testing/selftests/resctrl/cat_test.c > +++

Re: [PATCH v5 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-09 Thread Reinette Chatre
Hi Maciej, On 2/9/2024 6:01 AM, Maciej Wieczor-Retman wrote: ... > diff --git a/tools/testing/selftests/resctrl/resctrl.h > b/tools/testing/selftests/resctrl/resctrl.h > index 5116ea082d03..f434a6543b4f 100644 > --- a/tools/testing/selftests/resctrl/resctrl.h > +++

Re: [PATCH v5 2/5] selftests/resctrl: Add a helper for the non-contiguous test

2024-02-09 Thread Reinette Chatre
ut. > > Add a generic helper function to read an unsigned number from > /sys/fs/resctrl/info//. > > Signed-off-by: Maciej Wieczor-Retman > Reviewed-by: Ilpo Järvinen > --- Thank you. Reviewed-by: Reinette Chatre Reinette

Re: resctrl selftests ready for inclusion

2024-02-08 Thread Reinette Chatre
Hi Shuah, On 1/22/2024 10:06 AM, Reinette Chatre wrote: > Could you please consider Ilpo's resctrl selftest enhancements [1] > for inclusion into kselftest's "next" branch in preparation for the > next merge window? I just confirmed that, even though [1] is almost two months

Re: [PATCH v4 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-05 Thread Reinette Chatre
rm return value of write_schemata() and > non-contiguous CBMs support information match. > > Signed-off-by: Maciej Wieczor-Retman > --- Thank you very much. Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v4 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-02-05 Thread Reinette Chatre
Hi Maciej, On 2/5/2024 4:08 AM, Maciej Wieczor-Retman wrote: > Feature checking done by resctrl_mon_feature_exists() covers features > represented by the feature name presence inside the 'mon_features' file > in /sys/fs/resctrl/info/L3_MON directory. There exists a different way > to represent

Re: [PATCH v4 3/5] selftests/resctrl: Split validate_resctrl_feature_request()

2024-02-05 Thread Reinette Chatre
On 2/5/2024 5:24 AM, Maciej Wieczor-Retman wrote: > On 2024-02-05 at 14:41:30 +0200, Ilpo Järvinen wrote: >> On Mon, 5 Feb 2024, Maciej Wieczor-Retman wrote: >> >>> validate_resctrl_feature_request() is used to test both if a resource is >>> present in the info directory, and if a passed

Re: [PATCH v4 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-02-05 Thread Reinette Chatre
Hi Maciej, The subject mentions "helpers" (plural) that may not be accurate anymore. On 2/5/2024 4:08 AM, Maciej Wieczor-Retman wrote: > The CAT non-contiguous selftests have to read the file responsible for > reporting support of non-contiguous CBMs in kernel (resctrl). Then the > test compares

Re: [PATCH v4 1/5] selftests/resctrl: Add test groups and name L3 CAT test L3_CAT

2024-02-05 Thread Reinette Chatre
cting tests as groups and call L3 CAT test "L3_CAT", "CAT" > group will enable all CAT related tests. > > Signed-off-by: Ilpo Järvinen > Signed-off-by: Maciej Wieczor-Retman > --- Thank you. Reviewed-by: Reinette Chatre Reinette

Re: [PATCH v3 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-02 Thread Reinette Chatre
Hi Maciej, On 2/2/2024 2:17 AM, Maciej Wieczor-Retman wrote: > On 2024-02-01 at 11:47:44 -0800, Reinette Chatre wrote: >> Hi Maciej, >> >> On 1/31/2024 4:55 AM, Maciej Wieczor-Retman wrote: >>> On 2024-01-26 at 13:10:18 -0800, Reinette Chatre wrote: >>>

Re: [PATCH v3 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-02-01 Thread Reinette Chatre
Hi Maciej, On 1/31/2024 4:55 AM, Maciej Wieczor-Retman wrote: > On 2024-01-26 at 13:10:18 -0800, Reinette Chatre wrote: >> On 1/25/2024 3:13 AM, Maciej Wieczor-Retman wrote: >>> Add tests for both L2 and L3 CAT to verify the return values >>> generated by writin

Re: [PATCH v3 5/5] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-01-26 Thread Reinette Chatre
Hi Maciej, On 1/25/2024 3:13 AM, Maciej Wieczor-Retman wrote: > Add tests for both L2 and L3 CAT to verify the return values > generated by writing non-contiguous CBMs don't contradict the > reported non-contiguous support information. > > Use a logical XOR to confirm return value of

Re: [PATCH v3 4/5] selftests/resctrl: Add resource_info_file_exists()

2024-01-26 Thread Reinette Chatre
Hi Maciej, On 1/25/2024 3:12 AM, Maciej Wieczor-Retman wrote: > Feature checking done by resctrl_mon_feature_exists() covers features > represented by the feature name presence inside the 'mon_features' file > in /sys/fs/resctrl/info/L3_MON directory. There exists a different way > to represent

Re: [PATCH v3 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-01-26 Thread Reinette Chatre
Hi Maciej, On 1/25/2024 3:10 AM, Maciej Wieczor-Retman wrote: > The CAT non-contiguous selftests have to read the file responsible for > reporting support of non-contiguous CBMs in kernel (resctrl). Then the > test compares if that information matches what is reported by CPUID > output. > > Add

Re: [PATCH v3 2/5] selftests/resctrl: Add helpers for the non-contiguous test

2024-01-26 Thread Reinette Chatre
On 1/25/2024 4:14 AM, Ilpo Järvinen wrote: > On Thu, 25 Jan 2024, Maciej Wieczor-Retman wrote: >> +fp = fopen(file_path, "r"); >> +if (!fp) { >> +snprintf(reason, sizeof(reason), "Error in opening %s file\n", >> filename); >> +ksft_perror(reason); > > Was

Re: [PATCH v2 4/4] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-01-23 Thread Reinette Chatre
Hi Maciej, On 1/22/2024 11:58 PM, Maciej Wieczór-Retman wrote: > On 2024-01-22 at 08:32:36 -0800, Reinette Chatre wrote: >> Hi Maciej, >> >> On 1/21/2024 11:56 PM, Maciej Wieczór-Retman wrote: >>> Hi! >>> >>> On 2024-01-19 at 08:39:31 -0800, Reine

resctrl selftests ready for inclusion

2024-01-22 Thread Reinette Chatre
Hi Shuah, Could you please consider Ilpo's resctrl selftest enhancements [1] for inclusion into kselftest's "next" branch in preparation for the next merge window? Thank you very much. Reinette [1] https://lore.kernel.org/lkml/20231215150515.36983-1-ilpo.jarvi...@linux.intel.com/

Re: [PATCH v2 4/4] selftests/resctrl: Add non-contiguous CBMs CAT test

2024-01-22 Thread Reinette Chatre
Hi Maciej, On 1/21/2024 11:56 PM, Maciej Wieczór-Retman wrote: > Hi! > > On 2024-01-19 at 08:39:31 -0800, Reinette Chatre wrote: >> Hi Maciej, >> >> On 1/18/2024 11:37 PM, Maciej Wieczór-Retman wrote: >>> On 2024-01-18 at 09:15:46 -0800, Reinette Chatre wrot

  1   2   3   >