Re: [PATCH v8 0/2] selftests/resctrl: SNC kernel support discovery

2025-01-14 Thread Reinette Chatre
On 1/14/25 3:25 PM, Shuah Khan wrote: > > Thank you for bumping it up to top of my Inbox. > I will apply these for 6.14-rc1 now. > Thank you very much Shuah. Reinette

Re: [PATCH v8 0/2] selftests/resctrl: SNC kernel support discovery

2025-01-14 Thread Reinette Chatre
Hi Shuah, On 12/19/24 10:35 AM, Reinette Chatre wrote: > Hi Shuah, > > On 12/16/24 7:18 AM, Maciej Wieczor-Retman wrote: >> >> Sub-Numa Clustering (SNC) allows splitting CPU cores, caches and memory >> into multiple NUMA nodes. When enabled, NUMA-aware applica

Re: [PATCH v8 0/2] selftests/resctrl: SNC kernel support discovery

2024-12-19 Thread Reinette Chatre
Hi Shuah, On 12/16/24 7:18 AM, Maciej Wieczor-Retman wrote: > > Sub-Numa Clustering (SNC) allows splitting CPU cores, caches and memory > into multiple NUMA nodes. When enabled, NUMA-aware applications can > achieve better performance on bigger server platforms. > > SNC support was merged into t

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

2024-12-16 Thread Reinette Chatre
veloped-by: Tony Luck > Signed-off-by: Tony Luck > Signed-off-by: Maciej Wieczor-Retman > --- Thank you very much. Reviewed-by: Reinette Chatre Reinette

[PATCH] KVM: selftests: Add printf attribute to _no_printf()

2024-12-13 Thread Reinette Chatre
gelog] Signed-off-by: Isaku Yamahata Signed-off-by: Reinette Chatre --- tools/testing/selftests/kvm/include/test_util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h

Re: [PATCH v7 2/2] selftests/resctrl: Discover SNC kernel support and adjust messages

2024-12-09 Thread Reinette Chatre
liable path to check for existence of sub node files is > /sys/fs/resctrl/mon_data/mon_L3_00/mon_sub_L3_00. > > Add helper that checks for mon_sub_L3_00 existence. > > Correct old messages to account for kernel support of SNC in > resctrl. > > Signed-off-by: Maciej Wi

Re: [PATCH v7 0/2] selftests/resctrl: SNC kernel support discovery

2024-12-09 Thread Reinette Chatre
Hi Maciej, On 12/9/24 3:09 AM, Maciej Wieczor-Retman wrote: > > Sub-Numa Clustering (SNC) allows splitting CPU cores, caches and memory > into multiple NUMA nodes. When enabled, NUMA-aware applications can > achieve better performance on bigger server platforms. > > SNC support in the kernel was

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

2024-12-09 Thread Reinette Chatre
Hi Maciej, On 12/9/24 3:09 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, four or six > nodes. When SNC mode is enabled the effective amount of L3 cache > available for allocatio

Re: [PATCH v6 2/2] selftests/resctrl: Discover SNC kernel support and adjust messages

2024-12-03 Thread Reinette Chatre
Hi Maciej, On 12/2/24 3:08 AM, Maciej Wieczor-Retman wrote: > diff --git a/tools/testing/selftests/resctrl/resctrlfs.c > b/tools/testing/selftests/resctrl/resctrlfs.c > index 50561993d37c..d0a5c0f78397 100644 > --- a/tools/testing/selftests/resctrl/resctrlfs.c > +++ b/tools/testing/selftests/res

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

2024-12-03 Thread Reinette Chatre
Hi Maciej, On 12/2/24 3:08 AM, Maciej Wieczor-Retman wrote: > diff --git a/tools/testing/selftests/resctrl/resctrlfs.c > b/tools/testing/selftests/resctrl/resctrlfs.c > index d38d6dd90be4..50561993d37c 100644 > --- a/tools/testing/selftests/resctrl/resctrlfs.c > +++ b/tools/testing/selftests/res

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

2024-11-05 Thread Reinette Chatre
Hi Maciej, On 10/29/24 6:00 AM, Maciej Wieczor-Retman wrote: > diff --git a/tools/testing/selftests/resctrl/resctrl.h > b/tools/testing/selftests/resctrl/resctrl.h > index 2dda56084588..851b37c9c38a 100644 > --- a/tools/testing/selftests/resctrl/resctrl.h > +++ b/tools/testing/selftests/resctrl/r

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

2024-11-05 Thread Reinette Chatre
Hi Maciej, On 10/29/24 6:00 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 accur

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

2024-11-05 Thread Reinette Chatre
Hi Maciej, On 10/29/24 6:00 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 allocati

Re: [PATCH V4 00/15] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-11-04 Thread Reinette Chatre
On 11/4/24 4:07 PM, Shuah Khan wrote: > On 11/4/24 16:14, Reinette Chatre wrote: >> >> >> On 11/4/24 2:28 PM, Shuah Khan wrote: >>> On 11/4/24 15:16, Reinette Chatre wrote: >>>> Hi Shuah, >>>> >>>> On 10/24/24 3:36 PM

Re: [PATCH V4 00/15] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-11-04 Thread Reinette Chatre
On 11/4/24 2:28 PM, Shuah Khan wrote: > On 11/4/24 15:16, Reinette Chatre wrote: >> Hi Shuah, >> >> On 10/24/24 3:36 PM, Shuah Khan wrote: >>> On 10/24/24 15:18, Reinette Chatre wrote: >>> >>> Is this patch series ready to be applied? >>&g

Re: [PATCH V4 00/15] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-11-04 Thread Reinette Chatre
Hi Shuah, On 10/24/24 3:36 PM, Shuah Khan wrote: > On 10/24/24 15:18, Reinette Chatre wrote: > > Is this patch series ready to be applied? > It is now ready after receiving anticipated tags. Could you please consider it for inclusion? Thank you very much. Reinette

Re: [PATCH V4 00/15] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-10-25 Thread Reinette Chatre
On 10/25/24 6:54 AM, Ilpo Järvinen wrote: > On Thu, 24 Oct 2024, Reinette Chatre wrote: > >> Hi Shuah, >> >> On 10/24/24 3:36 PM, Shuah Khan wrote: >>> >>> Is this patch series ready to be applied? >>> >> >> I believe it is close

[PATCH V4 09/15] selftests/resctrl: Remove unused measurement code

2024-10-25 Thread Reinette Chatre
nt "mem_bw". Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Add Ilpo's Reviewed-by tag. Changes since V1: - New patch. --- tools/testing/selftests/resctrl/mba_test.c| 4 +- tools/testing/selftests/resctrl/mbm_test.c| 4 +- tools/

[PATCH V4 00/15] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-10-25 Thread Reinette Chatre
e to AMD systems since it only applies to the MBA and MBM tests that are isolated to Intel. [1] https://ark.intel.com/content/www/us/en/ark/products/237261/intel-xeon-platinum-8592-processor-320m-cache-1-9-ghz.html Reinette Chatre (15): selftests/resctrl: Make functions only used in same fi

[PATCH V4 10/15] selftests/resctrl: Make benchmark parameter passing robust

2024-10-25 Thread Reinette Chatre
existing behavior of CMT test is to use test defined value for the buffer size even if the user provides another value via command line. This behavior is maintained since the test requires that the buffer size matches the size of the cache allocated, and the amount of cache allocated can instead

[PATCH V4 04/15] selftests/resctrl: Protect against array overrun during iMC config parsing

2024-10-24 Thread Reinette Chatre
ory bandwidth from perf IMC counter and from resctrl file system") Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Rephrase changelog. (Ilpo) - Add Ilpo's Reviewed-by tag. Changes since V1: - New patch. --- tools/testing/selftests/resctrl/resctrl_v

[PATCH V4 01/15] selftests/resctrl: Make functions only used in same file static

2024-10-24 Thread Reinette Chatre
ask' was not declared. Should it be static? Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since v1: - Add Ilpo's Reviewed-by tag. - Let subject describe the change, not the tool that found it. (checkpatch.pl) --- tools/testing/selftests/resctrl/resctrl_val.c | 8

[PATCH V4 02/15] selftests/resctrl: Print accurate buffer size as part of MBM results

2024-10-24 Thread Reinette Chatre
ther benchmark (that may or may not use a buffer) or if user space amended the buffer size. Ensure that accurate buffer size is printed when using "fill_buf" benchmark and omit the buffer size information if another benchmark is used. Fixes: ecdbb911f22d ("selftests/resctrl: Add

[PATCH V4 15/15] selftests/resctrl: Replace magic constants used as array size

2024-10-24 Thread Reinette Chatre
the test parameters the array size depends on. Reported-by: Ilpo Järvinen Closes: https://lore.kernel.org/all/45af2a8c-517d-8f0d-137d-ad0f3f6a3...@linux.intel.com/ Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V3: - Add Ilpo's Reviewed-by tag. Changes sin

[PATCH V4 08/15] selftests/resctrl: Only support measured read operation

2024-10-24 Thread Reinette Chatre
te" operations to the buffer. Ignore any attempt from user space to enable this unsupported test configuration, instead always use read operations. Keep the initialization of the, now unused, "fill_buf" parameters to reserve these parameter positions since it has been exposed as an A

Re: [PATCH V4 00/15] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-10-24 Thread Reinette Chatre
Hi Shuah, On 10/24/24 3:36 PM, Shuah Khan wrote: > > Is this patch series ready to be applied? > I believe it is close ... I would like to give Ilpo some time to peek at patches 2 and 10 to confirm if I got their fixes right this time. The rest of the series is ready. Thank you Reinette

[PATCH V4 06/15] selftests/resctrl: Make wraparound handling obvious

2024-10-24 Thread Reinette Chatre
. This avoids wraparound while making the purpose of "allocation > ALLOCATION_MAX" clear and eliminates the need for the "allocation < ALLOCATION_MIN" check. Reported-by: Ilpo Järvinen Closes: https://lore.kernel.org/lkml/1903ac13-5c9c-ef8d-78e0-417ac34a9...@linux.intel.com/ S

[PATCH V4 14/15] selftests/resctrl: Keep results from first test run

2024-10-24 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 V4 11/15] selftests/resctrl: Ensure measurements skip initialization of default benchmark

2024-10-24 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 provided b

[PATCH V4 13/15] selftests/resctrl: Do not compare performance counters and resctrl at low bandwidth

2024-10-24 Thread Reinette Chatre
t adequate comparison between performance counters and resctrl. Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Add Ilpo's Reviewed-by tag. Changes since V1: - Fix code alignment and spacing. - Modify flow to use "continue" instead of "break" n

[PATCH V4 12/15] selftests/resctrl: Use cache size to determine "fill_buf" buffer size

2024-10-24 Thread Reinette Chatre
ss while keeping the existing default as minimum, now renamed to MINIMUM_SPAN, that has been appropriate for testing so far. Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V3: - Add Ilpo's Reviewed-by tag. Changes since V2: - Move duplicate code into helper. (Il

[PATCH V4 07/15] selftests/resctrl: Remove "once" parameter required to be false

2024-10-24 Thread Reinette Chatre
ly cycle through the buffer once (by setting "once = true") and thus breaking the CMT, MBA, and MBM tests that expect workload/interference to be reflected by their measurements. Prevent user space from changing the "once" parameter and ensure that it is always false for the CMT, MBA

[PATCH V4 05/15] selftests/resctrl: Protect against array overflow when reading strings

2024-10-24 Thread Reinette Chatre
the maximum field width. Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- This makes the code robust against any changes in information read from sysfs. The existing sysfs content fit well into the arrays, thus this is not considered a bugfix. Changes since V3: - Add Ilpo's Rev

[PATCH V4 03/15] selftests/resctrl: Fix memory overflow due to unhandled wraparound

2024-10-24 Thread Reinette Chatre
39 ("selftests/resctrl: Add built in benchmark") Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Add Ilpo's Reviewed-by tag. Changes since V1: - New patch. --- tools/testing/selftests/resctrl/fill_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

Re: [PATCH V3 10/15] selftests/resctrl: Make benchmark parameter passing robust

2024-10-18 Thread Reinette Chatre
Hi Ilpo, On 10/18/24 2:03 AM, Ilpo Järvinen wrote: > On Thu, 17 Oct 2024, Reinette Chatre wrote: >> +/* >> + * Allocate and initialize a struct fill_buf_param with user provided >> + * (via "-b fill_buf ") parameters. >> + * >> + * Use defaults (that ma

Re: [PATCH V3 02/15] selftests/resctrl: Print accurate buffer size as part of MBM results

2024-10-18 Thread Reinette Chatre
Hi Ilpo, On 10/18/24 1:46 AM, Ilpo Järvinen wrote: > On Thu, 17 Oct 2024, Reinette Chatre wrote: >> @@ -138,15 +139,26 @@ static int mbm_run_test(const struct resctrl_test >> *test, const struct user_param >> .setup = mbm_setup, >

[PATCH V3 14/15] selftests/resctrl: Keep results from first test run

2024-10-17 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 V3 15/15] selftests/resctrl: Replace magic constants used as array size

2024-10-17 Thread Reinette Chatre
the test parameters the array size depends on. Reported-by: Ilpo Järvinen Closes: https://lore.kernel.org/all/45af2a8c-517d-8f0d-137d-ad0f3f6a3...@linux.intel.com/ Signed-off-by: Reinette Chatre --- Changes since V2: - New patch. --- tools/testing/selftests/resctrl/mba_test.c | 3 ++- 1 file

[PATCH V3 13/15] selftests/resctrl: Do not compare performance counters and resctrl at low bandwidth

2024-10-17 Thread Reinette Chatre
t adequate comparison between performance counters and resctrl. Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Add Ilpo's Reviewed-by tag. Changes since V1: - Fix code alignment and spacing. - Modify flow to use "continue" instead of "break" n

[PATCH V3 11/15] selftests/resctrl: Ensure measurements skip initialization of default benchmark

2024-10-17 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 provided b

[PATCH V3 12/15] selftests/resctrl: Use cache size to determine "fill_buf" buffer size

2024-10-17 Thread Reinette Chatre
ss while keeping the existing default as minimum, now renamed to MINIMUM_SPAN, that has been appropriate for testing so far. Signed-off-by: Reinette Chatre --- Changes since V2: - Move duplicate code into helper. (Ilpo) - Rename DEFAULT_SPAN to MINIMUM_SPAN to reflect its new purpose. (Ilpo) -

[PATCH V3 10/15] selftests/resctrl: Make benchmark parameter passing robust

2024-10-17 Thread Reinette Chatre
existing behavior of CMT test is to use test defined value for the buffer size even if the user provides another value via command line. This behavior is maintained since the test requires that the buffer size matches the size of the cache allocated, and the amount of cache allocated can inste

[PATCH V3 08/15] selftests/resctrl: Only support measured read operation

2024-10-17 Thread Reinette Chatre
te" operations to the buffer. Ignore any attempt from user space to enable this unsupported test configuration, instead always use read operations. Keep the initialization of the, now unused, "fill_buf" parameters to reserve these parameter positions since it has been exposed as an API.

[PATCH V3 09/15] selftests/resctrl: Remove unused measurement code

2024-10-17 Thread Reinette Chatre
nt "mem_bw". Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Add Ilpo's Reviewed-by tag. Changes since V1: - New patch. --- tools/testing/selftests/resctrl/mba_test.c| 4 +- tools/testing/selftests/resctrl/mbm_test.c| 4 +- tools/

[PATCH V3 07/15] selftests/resctrl: Remove "once" parameter required to be false

2024-10-17 Thread Reinette Chatre
ly cycle through the buffer once (by setting "once = true") and thus breaking the CMT, MBA, and MBM tests that expect workload/interference to be reflected by their measurements. Prevent user space from changing the "once" parameter and ensure that it is always false for the CMT, MBA

[PATCH V3 06/15] selftests/resctrl: Make wraparound handling obvious

2024-10-17 Thread Reinette Chatre
. This avoids wraparound while making the purpose of "allocation > ALLOCATION_MAX" clear and eliminates the need for the "allocation < ALLOCATION_MIN" check. Reported-by: Ilpo Järvinen Closes: https://lore.kernel.org/lkml/1903ac13-5c9c-ef8d-78e0-417ac34a9...@linux.intel.com/ S

[PATCH V3 05/15] selftests/resctrl: Protect against array overflow when reading strings

2024-10-17 Thread Reinette Chatre
the maximum field width. Signed-off-by: Reinette Chatre --- This makes the code robust against any changes in information read from sysfs. The existing sysfs content fit well into the arrays, thus this is not considered a bugfix. Changes since V2: - New patch --- tools/testing/selftests/resctrl

[PATCH V3 03/15] selftests/resctrl: Fix memory overflow due to unhandled wraparound

2024-10-17 Thread Reinette Chatre
39 ("selftests/resctrl: Add built in benchmark") Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Add Ilpo's Reviewed-by tag. Changes since V1: - New patch. --- tools/testing/selftests/resctrl/fill_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletio

[PATCH V3 04/15] selftests/resctrl: Protect against array overrun during iMC config parsing

2024-10-17 Thread Reinette Chatre
ory bandwidth from perf IMC counter and from resctrl file system") Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since V2: - Rephrase changelog. (Ilpo) - Add Ilpo's Reviewed-by tag. Changes since V1: - New patch. --- tools/testing/selftests/resctrl/resctrl_v

[PATCH V3 02/15] selftests/resctrl: Print accurate buffer size as part of MBM results

2024-10-17 Thread Reinette Chatre
ther benchmark (that may or may not use a buffer) or if user space amended the buffer size. Ensure that accurate buffer size is printed when using "fill_buf" benchmark and omit the buffer size information if another benchmark is used. Fixes: ecdbb911f22d ("selftests/resctrl: Add

[PATCH V3 01/15] selftests/resctrl: Make functions only used in same file static

2024-10-17 Thread Reinette Chatre
ask' was not declared. Should it be static? Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since v1: - Add Ilpo's Reviewed-by tag. - Let subject describe the change, not the tool that found it. (checkpatch.pl) --- tools/testing/selftests/resctrl/resctrl_val.c | 8

[PATCH V3 00/15] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-10-17 Thread Reinette Chatre
t is not applicable to AMD systems since it only applies to the MBA and MBM tests that are isolated to Intel. [1] https://ark.intel.com/content/www/us/en/ark/products/237261/intel-xeon-platinum-8592-processor-320m-cache-1-9-ghz.html Reinette Chatre (15): selftests/resctrl: Make functions only us

Re: [PATCH V2 13/13] selftests/resctrl: Keep results from first test run

2024-10-04 Thread Reinette Chatre
Hi Ilpo, On 10/4/24 7:29 AM, Ilpo Järvinen wrote: > On Thu, 12 Sep 2024, Reinette Chatre wrote: ... >> diff --git a/tools/testing/selftests/resctrl/mbm_test.c >> b/tools/testing/selftests/resctrl/mbm_test.c >> index 7635ee6b9339..8c818e292dce 100644 >> --- a/tool

Re: [PATCH V2 11/13] selftests/resctrl: Use cache size to determine "fill_buf" buffer size

2024-10-04 Thread Reinette Chatre
Hi Ilpo, On 10/4/24 7:20 AM, Ilpo Järvinen wrote: > On Thu, 12 Sep 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

Re: [PATCH V2 09/13] selftests/resctrl: Make benchmark parameter passing robust

2024-10-04 Thread Reinette Chatre
Hi Ilpo, On 10/4/24 7:05 AM, Ilpo Järvinen wrote: > On Thu, 12 Sep 2024, Reinette Chatre wrote: >> tools/testing/selftests/resctrl/cmt_test.c| 32 ++ >> tools/testing/selftests/resctrl/mba_test.c| 13 ++- >> tools/testing/selftests/resctrl/mbm_test.c

Re: [PATCH V2 06/13] selftests/resctrl: Remove "once" parameter required to be false

2024-09-30 Thread Reinette Chatre
Hi Ilpo, On 9/30/24 6:49 AM, Ilpo Järvinen wrote: > On Thu, 12 Sep 2024, Reinette Chatre wrote: > >> The CMT, MBM, and MBA tests rely on a benchmark that runs while >> the test makes changes to needed configuration (for example memory >> bandwidth allocation) and takes

Re: [PATCH V2 07/13] selftests/resctrl: Only support measured read operation

2024-09-30 Thread Reinette Chatre
Hi Ilpo, On 9/30/24 6:52 AM, Ilpo Järvinen wrote: > On Thu, 12 Sep 2024, Reinette Chatre wrote: >> diff --git a/tools/testing/selftests/resctrl/resctrl.h >> b/tools/testing/selftests/resctrl/resctrl.h >> index 51f5f4b25e06..ba1ce1b35699 100644 >> --- a/tools/testing/

Re: [PATCH V2 04/13] selftests/resctrl: Protect against array overrun during iMC config parsing

2024-09-30 Thread Reinette Chatre
Hi Ilpo, On 9/30/24 6:35 AM, Ilpo Järvinen wrote: > On Thu, 12 Sep 2024, Reinette Chatre wrote: > >> The MBM and MBA tests need to discover the event and umask with which to >> configure the performance event used to measure read memory bandwidth. >> This is done by

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

2024-09-17 Thread Reinette Chatre
Hi Maciej, On 8/27/24 1:15 AM, Maciej Wieczor-Retman wrote: On 2024-08-12 at 16:40:10 -0700, Reinette Chatre wrote: On 7/12/24 2:04 AM, Maciej Wieczor-Retman wrote: + + if ((get_vendor() == ARCH_INTEL) && snc_unreliable) { + ksft_print_msg("Sub-NUMA Cluster

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

2024-09-12 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 me

[PATCH V2 12/13] selftests/resctrl: Do not compare performance counters and resctrl at low bandwidth

2024-09-12 Thread Reinette Chatre
t adequate comparison between performance counters and resctrl. Signed-off-by: Reinette Chatre --- Changes since V1: - Fix code alignment and spacing. - Modify flow to use "continue" instead of "break" now that earlier changes decreases throttling. - Expand comment of define to e

[PATCH V2 10/13] selftests/resctrl: Ensure measurements skip initialization of default benchmark

2024-09-12 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 provided b

[PATCH V2 11/13] selftests/resctrl: Use cache size to determine "fill_buf" buffer size

2024-09-12 Thread Reinette Chatre
ss while keeping the existing default as minimum that has been appropriate for testing so far. Signed-off-by: Reinette Chatre --- Changes since V1: - Ensure buffer is at least double L3 cache size. (Ilpo) - Support user override of default buffer size. (Ilpo) --- tools/testing/selftests/re

[PATCH V2 09/13] selftests/resctrl: Make benchmark parameter passing robust

2024-09-12 Thread Reinette Chatre
existing behavior of CMT test is to use test defined value for the buffer size even if the user provides another value via command line. This behavior is maintained since the test requires that the buffer size matches the size of the cache allocated, and the amount of cache allocated can instead be ch

[PATCH V2 08/13] selftests/resctrl: Remove unused measurement code

2024-09-12 Thread Reinette Chatre
nt "mem_bw". Signed-off-by: Reinette Chatre --- Changes since V1: - New patch. --- tools/testing/selftests/resctrl/mba_test.c| 4 +- tools/testing/selftests/resctrl/mbm_test.c| 4 +- tools/testing/selftests/resctrl/resctrl.h | 8 +- tools/testing/selftes

[PATCH V2 07/13] selftests/resctrl: Only support measured read operation

2024-09-12 Thread Reinette Chatre
the MBA and MBM tests only measure "read" operations. The "read" operation is also most appropriate for the CMT test that aims to use the benchmark to allocate into the cache. Avoid any potential inconsistencies between test and measurement by removing code for unsupported "

[PATCH V2 06/13] selftests/resctrl: Remove "once" parameter required to be false

2024-09-12 Thread Reinette Chatre
ly cycle through the buffer once (by setting "once = true") and thus breaking the CMT, MBA, and MBM tests that expect workload/interference to be reflected by their measurements. Prevent user space from changing the "once" parameter and ensure that it is always false for the CMT, MBA

[PATCH V2 04/13] selftests/resctrl: Protect against array overrun during iMC config parsing

2024-09-12 Thread Reinette Chatre
trl: Read memory bandwidth from perf IMC counter and from resctrl file system") Signed-off-by: Reinette Chatre --- Changes since V1: - New patch. --- tools/testing/selftests/resctrl/resctrl_val.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/sel

[PATCH V2 05/13] selftests/resctrl: Make wraparound handling obvious

2024-09-12 Thread Reinette Chatre
. This avoids wraparound while making the purpose of "allocation > ALLOCATION_MAX" clear and eliminates the need for the "allocation < ALLOCATION_MIN" check. Reported-by: Ilpo Järvinen Closes: https://lore.kernel.org/lkml/1903ac13-5c9c-ef8d-78e0-417ac34a9...@linux.intel.com/ S

[PATCH V2 03/13] selftests/resctrl: Fix memory overflow due to unhandled wraparound

2024-09-12 Thread Reinette Chatre
39 ("selftests/resctrl: Add built in benchmark") Signed-off-by: Reinette Chatre --- Changes since V1: - New patch. --- tools/testing/selftests/resctrl/fill_buf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/resctrl/fill_buf.c b/tools

[PATCH V2 02/13] selftests/resctrl: Print accurate buffer size as part of MBM results

2024-09-12 Thread Reinette Chatre
ther benchmark (that may or may not use a buffer) or if user space amended the buffer size. Ensure that accurate buffer size is printed when using "fill_buf" benchmark and omit the buffer size information if another benchmark is used. Fixes: ecdbb911f22d ("selftests/resctrl: Add

[PATCH V2 01/13] selftests/resctrl: Make functions only used in same file static

2024-09-12 Thread Reinette Chatre
ask' was not declared. Should it be static? Signed-off-by: Reinette Chatre Reviewed-by: Ilpo Järvinen --- Changes since v1: - Add Ilpo's Reviewed-by tag. - Let subject describe the change, not the tool that found it. (checkpatch.pl) --- tools/testing/selftests/resctrl/resctrl_val.c | 8

[PATCH V2 00/13] selftests/resctrl: Support diverse platforms with MBM and MBA tests

2024-09-12 Thread Reinette Chatre
ements on Emerald Rapids, Sapphire Rapids, and Ice Lake systems. This limit is not applicable to AMD systems since it only applies to the MBA and MBM tests that are isolated to Intel. [1] https://ark.intel.com/content/www/us/en/ark/products/237261/intel-xeon-platinum-8592-processor-320m-cache

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

2024-09-06 Thread Reinette Chatre
Hi Ilpo, On 9/6/24 1:44 AM, Ilpo Järvinen wrote: On Thu, 5 Sep 2024, Reinette Chatre wrote: On 9/5/24 4:45 AM, Ilpo Järvinen wrote: On Wed, 4 Sep 2024, Reinette Chatre wrote: On 9/4/24 4:43 AM, Ilpo Järvinen wrote: On Fri, 30 Aug 2024, Reinette Chatre wrote: On 8/30/24 4:42 AM, Ilpo

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

2024-09-06 Thread Reinette Chatre
Hi Ilpo, On 9/6/24 3:00 AM, Ilpo Järvinen wrote: On Thu, 5 Sep 2024, Reinette Chatre wrote: On 9/5/24 5:10 AM, Ilpo Järvinen wrote: On Wed, 4 Sep 2024, Reinette Chatre wrote: On 9/4/24 4:57 AM, Ilpo Järvinen wrote: On Fri, 30 Aug 2024, Reinette Chatre wrote: On 8/30/24 3:56 AM, Ilpo

Re: [PATCH] selftests:resctrl: Fix build failure on archs without __cpuid_count()

2024-09-05 Thread Reinette Chatre
nst struct resctrl_test *test) return false; return ((ecx >> 3) & 1); +#endif /* end arch */ + return false; } static int noncont_cat_run_test(const struct resctrl_test *test, Thank you very much. Acked-by: Reinette Chatre Reinette

Re: [PATCH v4 0/4] selftests: Fix cpuid / vendor checking build issues

2024-09-05 Thread Reinette Chatre
Hi Shuah, On 9/5/24 11:06 AM, Shuah Khan wrote: On 9/4/24 06:54, Ilpo Järvinen wrote: On Wed, 4 Sep 2024, Shuah Khan wrote: On 9/4/24 06:18, Ilpo Järvinen wrote: On Tue, 3 Sep 2024, Shuah Khan wrote: On 9/3/24 08:45, Ilpo Järvinen wrote: This series first generalizes resctrl selftest non-

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

2024-09-05 Thread Reinette Chatre
Hi Ilpo, On 9/5/24 4:45 AM, Ilpo Järvinen wrote: On Wed, 4 Sep 2024, Reinette Chatre wrote: On 9/4/24 4:43 AM, Ilpo Järvinen wrote: On Fri, 30 Aug 2024, Reinette Chatre wrote: On 8/30/24 4:42 AM, Ilpo Järvinen wrote: On Thu, 29 Aug 2024, Reinette Chatre wrote: The MBA test incrementally

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

2024-09-05 Thread Reinette Chatre
Hi Ilpo, On 9/5/24 5:10 AM, Ilpo Järvinen wrote: On Wed, 4 Sep 2024, Reinette Chatre wrote: On 9/4/24 4:57 AM, Ilpo Järvinen wrote: On Fri, 30 Aug 2024, Reinette Chatre wrote: On 8/30/24 3:56 AM, Ilpo Järvinen wrote: On Thu, 29 Aug 2024, Reinette Chatre wrote: @@ -699,111 +639,80 @@ int

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

2024-09-04 Thread Reinette Chatre
Hi Ilpo, On 9/4/24 4:43 AM, Ilpo Järvinen wrote: On Fri, 30 Aug 2024, Reinette Chatre wrote: 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

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

2024-09-04 Thread Reinette Chatre
Hi Ilpo, On 9/4/24 4:57 AM, Ilpo Järvinen wrote: On Fri, 30 Aug 2024, Reinette Chatre wrote: 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

Re: [PATCH v4 3/4] selftests/x86: don't clobber CFLAGS

2024-09-03 Thread Reinette Chatre
Hi Ilpo, On 9/3/24 7:45 AM, Ilpo Järvinen wrote: The x86 selftests makefile clobbers CFLAGS preventing lib.mk from making the necessary adjustments into CFLAGS. This would lead to a build failure after upcoming change which wants to add -DHAVE_CPUID= into CFLAGS. Reorder CFLAGS initialization i

Re: [PATCH v2 1/2] x86/sgx: Resolve EAUG race where losing thread returns SIGBUS

2024-05-15 Thread Reinette Chatre
flags in all error handling > paths. In other words, the page is marked as reclaimable only in the > happy path of sgx_encl_eaug_page(). Therefore, in the particular code > path affected in this commit, the "page reclaimer tracked" condition is > always false and the warning

Re: [PATCH v2 2/2] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-05-15 Thread Reinette Chatre
x86/kernel/cpu/sgx/ioctl.c > index b65ab214bdf5..c542d4dd3e64 100644 > --- a/arch/x86/kernel/cpu/sgx/ioctl.c > +++ b/arch/x86/kernel/cpu/sgx/ioctl.c > @@ -1142,6 +1142,7 @@ static long sgx_encl_remove_pages(struct sgx_encl *encl, >* Do not keep encl->lock because of dependency on >* mmap_lock acquired in sgx_zap_enclave_ptes(). >*/ > + entry->desc |= SGX_ENCL_PAGE_BEING_REMOVED; > mutex_unlock(&encl->lock); > > sgx_zap_enclave_ptes(encl, addr); Thank you very much for tracking down and fixing this issue. Acked-by: Reinette Chatre Reinette

Re: [PATCH 2/2] x86/sgx: Resolve EREMOVE page vs EAUG page data race

2024-05-10 Thread Reinette Chatre
Hi Dmitrii, Thank you very much for uncovering and fixing this issue. On 4/30/2024 7:38 AM, Dmitrii Kuvaiskii wrote: > On Mon, Apr 29, 2024 at 04:11:03PM +0300, Jarkko Sakkinen wrote: >> On Mon Apr 29, 2024 at 1:43 PM EEST, Dmitrii Kuvaiskii wrote: >>> Two enclave threads may try to add and remov

Re: [PATCH 1/2] x86/sgx: Resolve EAUG race where losing thread returns SIGBUS

2024-05-10 Thread Reinette Chatre
ce, and (2) by >>> replacing sgx_encl_free_epc_page() with sgx_free_epc_page() so that no >>> EREMOVE is performed. >> >> What is the collateral damage caused by ENCLS[EREMOVE]? > > As explained above, the damage is that the SGX driver leaves the enclave

Re: [RFC PATCH 1/1] x86/sgx: Explicitly give up the CPU in EDMM's ioctl() to avoid softlockup

2024-04-23 Thread Reinette Chatre
Hi Kai, On 4/23/2024 4:50 AM, Huang, Kai wrote: >> diff --git a/arch/x86/kernel/cpu/sgx/ioctl.c >> b/arch/x86/kernel/cpu/sgx/ioctl.c >> index b65ab214bdf5..2340a82fa796 100644 >> --- a/arch/x86/kernel/cpu/sgx/ioctl.c >> +++ b/arch/x86/kernel/cpu/sgx/ioctl.c >> @@ -806,6 +806,9 @@ sgx_enclave_rest

Re: [PATCH v6] x86/sgx: Resolves SECS reclaim vs. page fault for EAUG race

2023-09-28 Thread Reinette Chatre
Hi Dave, On 9/28/2023 5:11 PM, Dave Hansen wrote: > On 9/28/23 16:08, Reinette Chatre wrote: >> I'd like to check in on the status of this patch. This two month old >> patch looks to be a needed fix and has Jarkko and Kai's review tags, >> but I am not able to fin

Re: [PATCH v6] x86/sgx: Resolves SECS reclaim vs. page fault for EAUG race

2023-09-28 Thread Reinette Chatre
86/sgx: Support adding of pages to an initialized > enclave") > Cc: sta...@vger.kernel.org # v6.0+ > Signed-off-by: Haitao Huang > Reviewed-by: Jarkko Sakkinen > Reviewed-by: Kai Huang > Acked-by: Reinette Chatre > --- > v6: > - Removed 'Under heavy load&#x

Re: [PATCH RESEND v3 1/2] selftests/resctrl: Fix schemata write error check

2023-09-11 Thread Reinette Chatre
Hi Maciej, On 9/1/2023 6:42 AM, Wieczor-Retman Maciej wrote: > Writing bitmasks to the schemata can fail when the bitmask doesn't > adhere to constraints defined by what a particular CPU supports. > Some example of constraints are max length or having contiguous bits. > The driver should properly

Re: [PATCH v2 02/24] x86/resctrl: Split struct rdt_domain

2021-04-08 Thread Reinette Chatre
Hi James, On 4/8/2021 10:20 AM, James Morse wrote: On 31/03/2021 22:36, Reinette Chatre wrote: On 3/12/2021 9:58 AM, James Morse wrote: resctrl is the defacto Linux ABI for SoC resource partitioning features. To support it on another architecture, it needs to be abstracted from the features

Re: [PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-04-08 Thread Reinette Chatre
Hi James, On 4/8/2021 10:20 AM, James Morse wrote: On 07/04/2021 00:42, Reinette Chatre wrote: On 4/6/2021 10:13 AM, James Morse wrote: On 31/03/2021 22:35, Reinette Chatre wrote: On 3/12/2021 9:58 AM, James Morse wrote: resctrl is the defacto Linux ABI for SoC resource partitioning

Re: [PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-04-06 Thread Reinette Chatre
Hi James, On 4/6/2021 10:13 AM, James Morse wrote: On 31/03/2021 22:35, Reinette Chatre wrote: On 3/12/2021 9:58 AM, James Morse wrote: resctrl is the defacto Linux ABI for SoC resource partitioning features. To support it on another architecture, it needs to be abstracted from the features

Re: [PATCH v2 10/24] x86/resctrl: Swizzle rdt_resource and resctrl_schema in pseudo_lock_region

2021-03-31 Thread Reinette Chatre
Hi James, On 3/12/2021 9:58 AM, James Morse wrote: struct pseudo_lock_region points to the rdt_resource. Once the resources are merged, this won't be unique. The resource name is moving into the scheam, so that eventually resctrl can generate s/scheam/schema/? Reinette

Re: [PATCH v2 07/24] x86/resctrl: Store the effective num_closid in the schema

2021-03-31 Thread Reinette Chatre
Hi James, On 3/12/2021 9:58 AM, James Morse wrote: The resctrl_schema struct holds properties that vary with the style of configuration that resctrl applies to a resource. There are already two values for the hardware's num_closid, depending on whether the architecture presents the L3 or L3CODE

Re: [PATCH v2 06/24] x86/resctrl: Walk the resctrl schema list instead of an arch list

2021-03-31 Thread Reinette Chatre
Hi James, On 3/12/2021 9:58 AM, James Morse wrote: Once the arch code is abstracted from the resctrl filesystem code the separate schema for CDP are created by the filesystem code. This means the same resource is used for different schema, or types of configuration. Helpers like rdtgroup_cbm_ov

Re: [PATCH v2 05/24] x86/resctrl: Label the resources with their configuration type

2021-03-31 Thread Reinette Chatre
Hi James, On 3/12/2021 9:58 AM, James Morse wrote: diff --git a/arch/x86/kernel/cpu/resctrl/internal.h b/arch/x86/kernel/cpu/resctrl/internal.h index 8a9da490134b..57484d2f6214 100644 --- a/arch/x86/kernel/cpu/resctrl/internal.h +++ b/arch/x86/kernel/cpu/resctrl/internal.h @@ -361,12 +361,14 @

Re: [PATCH v2 03/24] x86/resctrl: Add a separate schema list for resctrl

2021-03-31 Thread Reinette Chatre
Hi James, On 3/12/2021 9:58 AM, James Morse wrote: To support multiple architectures, the resctrl code needs to be split into a 'fs' specific part in core code, and an arch-specific backend. It should be difficult for the arch-specific backends to diverge, supporting slightly different ABIs for

Re: [PATCH v2 02/24] x86/resctrl: Split struct rdt_domain

2021-03-31 Thread Reinette Chatre
Hi James, On 3/12/2021 9:58 AM, James Morse wrote: resctrl is the defacto Linux ABI for SoC resource partitioning features. To support it on another architecture, it needs to be abstracted from the features provided by Intel RDT and AMD PQoS, and moved to /fs/. Split struct rdt_domain up too. M

Re: [PATCH v2 01/24] x86/resctrl: Split struct rdt_resource

2021-03-31 Thread Reinette Chatre
Hi James, A significant time has passed since the first version and with that a lot of my context lost. On 3/12/2021 9:58 AM, James Morse wrote: resctrl is the defacto Linux ABI for SoC resource partitioning features. To support it on another architecture, it needs to be abstracted from the f

  1   2   3   4   5   6   7   8   >