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 comparison between performance counters and resctrl i
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 when sizing the buffer used by the "fill_buf"
> benchmark.
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_buf" benchmark requires parameters and these are managed as
On Thu, 29 Aug 2024, Reinette Chatre wrote:
> The CMT, MBA, and MBM tests rely on the resctrl_val() wrapper to
> start and run a benchmark while providing test specific flows
> via callbacks to do test specific configuration and measurements.
>
> At a high level, the resctrl_val() flow is:
>
ols/testing/selftests/resctrl/resctrl_val.c:81:6: warning: symbol
> 'get_event_and_umask' was not declared. Should it be static?
>
> Signed-off-by: Reinette Chatre
Reviewed-by: Ilpo Järvinen
--
i.
oted down the reason for void casts in the stub
Ilpo Järvinen (3):
selftests/resctrl: Generalize non-contiguous CAT check
selftests/resctrl: Always initialize ecx to avoid build warnings
kselftest: Provide __cpuid_count() stub on non-x86 archs
tools/testing/selftests/kselftest.h
uire it using uname -m.
Provide a stub for __cpuid_count() if HAVE_CPUID is not present to
allow build to succeed. The stub casts its arguments to void to avoid
causing "unused variable" or "set but not used" warnings.
Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous
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
---
tools/testing/selftests/resctrl/cat_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
vendors.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Muhammad Usama Anjum
---
tools/testing/selftests/resctrl/cat_test.c | 26 +-
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cat_test.c
b/tools/testing/selftests/resctrl
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()
>
On Thu, 22 Aug 2024, Reinette Chatre wrote:
> 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
>
o succeed. The stub casts its arguments to void to avoid
causing variable unused warnings.
Fixes: ae638551ab64 ("selftests/resctrl: Add non-contiguous CBMs CAT test")
Reported-by: Muhammad Usama Anjum
Signed-off-by: Ilpo Järvinen
Tested-by: Muhammad Usama Anjum
Reviewed-by: Muhammad Usama
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
---
tools/testing/selftests/resctrl/cat_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
vendors.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Muhammad Usama Anjum
---
tools/testing/selftests/resctrl/cat_test.c | 26 +-
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cat_test.c
b/tools/testing/selftests/resctrl
ommon level rather than e.g.
disabling build for resctrl selftest for archs lacking resctrl support.
v2:
- Removed RFC from the last patch & added Fixes and tags
- Fixed the error message's line splits
- Noted down the reason for void casts in the stub
Ilpo Järvinen (3):
selftests/resct
On Thu, 22 Aug 2024, Muhammad Usama Anjum wrote:
> On 8/21/24 11:30 AM, Shuah Khan wrote:
> > On 8/13/24 04:45, Ilpo Järvinen wrote:
> >> First, generalize resctrl selftest non-contiguous CAT check to not
> >> assume non-AMD vendor implies Intel. Second, improve ksel
id_count'
303 | __cpuid_count(0x10, 2, eax, ebx, ecx, edx);
| ^
The resctrl selftest would run that code only on Intel CPUs but
as is, the code cannot be build at all.
Provide an empty stub for __cpuid_count() if it is not supported
to allow bu
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
---
tools/testing/selftests/resctrl/cat_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests
vendors.
Signed-off-by: Ilpo Järvinen
---
tools/testing/selftests/resctrl/cat_test.c | 26 +-
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cat_test.c
b/tools/testing/selftests/resctrl/cat_test.c
index 742782438ca3
some work on which symbol the
conditional in kselftest.h is implemented. I could not find any
pre-existing one that could be used. Perhaps somebody who's more
familiar with the kselftest build system has a better suggestion on
which symbol the logic should be based at?
Ilpo Järvin
On Mon, 12 Aug 2024, Reinette Chatre wrote:
> 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ärvin
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
> >
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 ARM, but arch_supports_noncont_cat() shows that
> only x86 for AMD and Intel are supported by the test.
One does not follow from the other. arch_supp
ned-off-by: Babu Moger
> Reviewed-by: Reinette Chatre
Thanks.
Reviewed-by: Ilpo Järvinen
--
i.
> ---
> 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
On Mon, 10 Jun 2024, Moger, Babu wrote:
> 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 t
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()
(In general, use () when refering to a function, same thing in the
shortlog).
"the warnings" sounds like I should know about what warning it fails with
but t
write_bm_pid_to_resctrl() resctrl_val parameter and resctrl_val
member from the struct resctrl_val_param that are not used anymore.
Similarly, remove the test name constants that are no longer used.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing
: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v7:
- Fix separator to use 3 dashes
v4:
- New patch
---
tools/testing/selftests/resctrl/cmt_test.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/testing
est initialization.
Remove also unused branches to setup paths and the related #defines
for CMT test.
While touching kerneldoc, make the adjacent line consistent with the
newly added form (callback vs call back).
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
-
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/resctrl: Add MBA test").
Remove the mongrp from MBA test.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reine
.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v6:
- Language tweak into kerneldoc
- Removed stale paragraph from commit message
v5:
- Return 0 if grp_name is null (restore earlier behavior)
- Move the root group note from comment into kerneldoc
v3:
- Removed
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
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl
esctrl_val().
- Pass bw_report to measure_mem_bw() from ->measure() hook because
resctrl_val() no longer needs bw_report for anything.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
- Use imperative tone in commit message
v2:
- Rebased on top of ne
ion which simplifies what
resctrl_val() has to do.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v2:
- spaces -> tabs
---
tools/testing/selftests/resctrl/cmt_test.c| 8
tools/testing/selftests/resctrl/mba_test.c| 9 -
tools/t
for that would complicate the code unnecessarily, the
selftest code does not need to be portable).
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
- Cast to int before printing to match with %d.
---
tools/testing/selftests/resctrl/cache.c | 10
selftest. Remove all unused branches opening other files to simplify
the code.
Suggested-by: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v4:
- Remove also MBM .mongrp setup
v3:
- New patch
---
tools/testing/selftests/resctrl/mbm_test.c
measure_vals() is awfully generic name so rename it to measure_mem_bw()
to describe better what it does and document the function parameters.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
- Typo fix to commit message
- Consistent caps in kerneldoc
) and
measure_llc_resctrl() more similar to each other.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl/resctrl.h | 9
tools/testing/selftests/resctrl/resctrl_val.c | 23 ---
2 files changed, 15 in
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
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl/resctrl_val.c | 33
Resctrl selftests refer to "bandwidth" currently in two other forms in
the code ("B/W" and "band width").
Use "bandwidth" consistently everywhere. While at it, fix also one
"over flow" -> "overflow" on a line that is touched by
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
Reviewed-by: Reinette Chatre
---
v7:
- Truly use "bound to", not
.
Fixes: 7f4d257e3a2a ("selftests/resctrl: Add callback to start a benchmark")
Suggested-by: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v4:
- Merge with the fix close patch
- Add loop to reset imc_counters_config fds to -1
idth" consistent in comments & prints
- New patch: Simplify mem bandwidth file code
- Remove wrong comment
- Changed grp_name check to return -1 on fail (internal sanity check)
v2:
- Resolved conflicts with kselftest/next
- Spaces -> tabs correction
Ilpo Järvinen (16):
selftests/r
On Fri, 7 Jun 2024, Reinette Chatre wrote:
> On 6/7/24 5:53 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 ov
write_bm_pid_to_resctrl() resctrl_val parameter and resctrl_val
member from the struct resctrl_val_param that are not used anymore.
Similarly, remove the test name constants that are no longer used.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing
: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
--
v4:
- New patch
---
tools/testing/selftests/resctrl/cmt_test.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cmt_test.c
b/tools
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/resctrl: Add MBA test").
Remove the mongrp from MBA test.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reine
.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v6:
- Language tweak into kerneldoc
- Removed stale paragraph from commit message
v5:
- Return 0 if grp_name is null (restore earlier behavior)
- Move the root group note from comment into kerneldoc
v3:
- Removed
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
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl
esctrl_val().
- Pass bw_report to measure_mem_bw() from ->measure() hook because
resctrl_val() no longer needs bw_report for anything.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
- Use imperative tone in commit message
v2:
- Rebased on top of ne
est initialization.
Remove also unused branches to setup paths and the related #defines
for CMT test.
While touching kerneldoc, make the adjacent line consistent with the
newly added form (callback vs call back).
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
-
ion which simplifies what
resctrl_val() has to do.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v2:
- spaces -> tabs
---
tools/testing/selftests/resctrl/cmt_test.c| 8
tools/testing/selftests/resctrl/mba_test.c| 9 -
tools/t
selftest. Remove all unused branches opening other files to simplify
the code.
Suggested-by: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v4:
- Remove also MBM .mongrp setup
v3:
- New patch
---
tools/testing/selftests/resctrl/mbm_test.c
measure_vals() is awfully generic name so rename it to measure_mem_bw()
to describe better what it does and document the function parameters.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
- Typo fix to commit message
- Consistent caps in kerneldoc
) and
measure_llc_resctrl() more similar to each other.
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl/resctrl.h | 9
tools/testing/selftests/resctrl/resctrl_val.c | 23 ---
2 files changed, 15 in
for that would complicate the code unnecessarily, the
selftest code does not need to be portable).
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v5:
- Cast to int before printing to match with %d.
---
tools/testing/selftests/resctrl/cache.c | 10
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
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl/resctrl_val.c | 33
Resctrl selftests refer to "bandwidth" currently in two other forms in
the code ("B/W" and "band width").
Use "bandwidth" consistently everywhere. While at it, fix also one
"over flow" -> "overflow" on a line that is touched by
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/rollback of the IMC perf
- Move the comment in
.
Fixes: 7f4d257e3a2a ("selftests/resctrl: Add callback to start a benchmark")
Suggested-by: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Tested-by: Babu Moger
Reviewed-by: Reinette Chatre
---
v4:
- Merge with the fix close patch
- Add loop to reset imc_counters_config fds to -1
th file code
- Remove wrong comment
- Changed grp_name check to return -1 on fail (internal sanity check)
v2:
- Resolved conflicts with kselftest/next
- Spaces -> tabs correction
Ilpo Järvinen (16):
selftests/resctrl: Fix closing IMC fds on error and open-code R+W
instead of loops
selftests
gt;> 3) & 1)) {
> + if ((get_vendor() == ARCH_INTEL) && sparse_masks != ((ecx >> 3) & 1)) {
> ksft_print_msg("CPUID output doesn't match 'sparse_masks' file
> content!\n");
> return 1;
> }
>
Reviewed-by: Ilpo Järvinen
--
i.
On Fri, 31 May 2024, Reinette Chatre wrote:
> On 5/31/24 6:11 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 ov
On Fri, 31 May 2024, Reinette Chatre wrote:
> On 5/31/24 6:11 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 a
write_bm_pid_to_resctrl() resctrl_val parameter and resctrl_val
member from the struct resctrl_val_param that are not used anymore.
Similarly, remove the test name constants that are no longer used.
Signed-off-by: Ilpo Järvinen
---
tools/testing/selftests/resctrl/cat_test.c| 5 +--
tools/testing
: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
--
v4:
- New patch
---
tools/testing/selftests/resctrl/cmt_test.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cmt_test.c
b/tools/testing/selftests/resctrl
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/resctrl: Add MBA test").
Remove the mongrp from MBA test.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
tools/testing
h the current selftests (ctrlgrp is never NULL).
Signed-off-by: Ilpo Järvinen
---
v5:
- Return 0 if grp_name is null (restore earlier behavior)
- Move the root group note from comment into kerneldoc
v3:
- Removed wrong comment
- Changed grp_name check to return -1 on fail (internal sanity
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
---
tools/testing/selftests/resctrl/resctrl.h | 7 ---
tools
esctrl_val().
- Pass bw_report to measure_mem_bw() from ->measure() hook because
resctrl_val() no longer needs bw_report for anything.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
v5:
- Use imperative tone in commit message
v2:
- Rebased on top of next to resolve conflict
est initialization.
Remove also unused branches to setup paths and the related #defines
for CMT test.
While touching kerneldoc, make the adjacent line consistent with the
newly added form (callback vs call back).
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
v5:
- Use consistent formatt
ion which simplifies what
resctrl_val() has to do.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
v2:
- spaces -> tabs
---
tools/testing/selftests/resctrl/cmt_test.c| 8
tools/testing/selftests/resctrl/mba_test.c| 9 -
tools/testing/selftests/r
selftest. Remove all unused branches opening other files to simplify
the code.
Suggested-by: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
v4:
- Remove also MBM .mongrp setup
v3:
- New patch
---
tools/testing/selftests/resctrl/mbm_test.c| 1 -
tools/testing
measure_vals() is awfully generic name so rename it to measure_mem_bw()
to describe better what it does and document the function parameters.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
v5:
- Typo fix to commit message
- Consistent caps in kerneldoc
---
tools/testing
) and
measure_llc_resctrl() more similar to each other.
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl/resctrl.h | 9
tools/testing/selftests/resctrl/resctrl_val.c | 23 ---
2 files changed, 15 insertions(+), 17
for that would complicate the code unnecessarily, the
selftest code does not need to be portable).
Signed-off-by: Ilpo Järvinen
---
v5:
- Cast to int before printing to match with %d.
---
tools/testing/selftests/resctrl/cache.c | 10 +-
tools/testing/selftests/resctrl/resctrl.h
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
Reviewed-by: Reinette Chatre
---
tools/testing/selftests/resctrl/resctrl_val.c | 33 ---
1 file changed
Resctrl selftests refer to "bandwidth" currently in two other forms in
the code ("B/W" and "band width").
Use "bandwidth" consistently everywhere. While at it, fix also one
"over flow" -> "overflow" on a line that is touched by
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()
- Read \n from the mem bw file to allow rewind to
.
Fixes: 7f4d257e3a2a ("selftests/resctrl: Add callback to start a benchmark")
Suggested-by: Reinette Chatre
Signed-off-by: Ilpo Järvinen
Reviewed-by: Reinette Chatre
---
v4:
- Merge with the fix close patch
- Add loop to reset imc_counters_config fds to -1 to be able know which
ne
sanity check)
v2:
- Resolved conflicts with kselftest/next
- Spaces -> tabs correction
Ilpo Järvinen (16):
selftests/resctrl: Fix closing IMC fds on error and open-code R+W
instead of loops
selftests/resctrl: Calculate resctrl FS derived mem bw over sleep(1)
only
selftests/resctrl
On Thu, 30 May 2024, Reinette Chatre wrote:
> 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 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/resctrl: Add MBA test&quo
On Wed, 29 May 2024, Reinette Chatre wrote:
> 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
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:
> > > > &g
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/M
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, measure_vals() calls get_mem_bw_imc() that performs
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 IMC are derived ov
user of resctrl_val gone, the parameter and member from the
struct resctrl_val_param can removed. Test name constants can also be
removed because they are not used anymore.
Signed-off-by: Ilpo Järvinen
---
tools/testing/selftests/resctrl/cat_test.c| 5 +--
tools/testing/selftests/resctrl
: Reinette Chatre
Signed-off-by: Ilpo Järvinen
--
v4:
- New patch
---
tools/testing/selftests/resctrl/cmt_test.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/testing/selftests/resctrl/cmt_test.c
b/tools/testing/selftests/resctrl/cmt_test.c
index 238f514ba7e6
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/resctrl: Add MBA test").
Remove the mongrp from MBA test.
Signed-off-by: Ilpo Järvinen
---
tools/testing/selftests/resctrl/mba_test.c | 1
h the current selftests (ctrlgrp is never NULL).
Signed-off-by: Ilpo Järvinen
---
v3:
- Removed wrong comment
- Changed grp_name check to return -1 on fail (internal sanity check)
---
tools/testing/selftests/resctrl/resctrl.h | 4 ++--
tools/testing/selftests/resctrl/resctrlfs.c
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
---
tools/testing/selftests/resctrl/resctrl.h | 7 ---
tools/testing/selftests/resctrl
esctrl_val().
- As resctrl_val() no longer needs bw_report for anything, it can just
be passed to measure_mem_bw() by the ->measure() hooks.
Signed-off-by: Ilpo Järvinen
---
v2:
- Rebased on top of next to resolve conflict in resctrl.h
---
tools/testing/selftests/resctrl/mba_test.c| 3 +--
est initialization.
Remove also unused branches to setup paths and the related #defines
for CMT test.
Signed-off-by: Ilpo Järvinen
---
v3:
- Rename init functions to _init()
- Removed tabs intermixed with code
- Leave now common mbm bw filename setup into resctrl_val.c
---
tools/testing/selftests/resc
ion which simplifies what
resctrl_val() has to do.
Signed-off-by: Ilpo Järvinen
---
v2:
- spaces -> tabs
---
tools/testing/selftests/resctrl/cmt_test.c| 8
tools/testing/selftests/resctrl/mba_test.c| 9 -
tools/testing/selftests/resctrl/mbm_test.c| 9 -
selftest. Remove all unused branches opening other files to simplify
the code.
Suggested-by: Reinette Chatre
Signed-off-by: Ilpo Järvinen
---
v4:
- Remove also MBM .mongrp setup
v3:
- New patch
---
tools/testing/selftests/resctrl/mbm_test.c| 1 -
tools/testing/selftests/resctrl/resctrl_val.c
measure_val() is awfully generic name so rename it to measure_mem_bw()
to describe better what it does and document the function parameters.
Signed-off-by: Ilpo Järvinen
---
tools/testing/selftests/resctrl/resctrl_val.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff
nd
measure_llc_resctrl() more similar to each other.
Signed-off-by: Ilpo Järvinen
---
tools/testing/selftests/resctrl/resctrl.h | 9
tools/testing/selftests/resctrl/resctrl_val.c | 23 ---
2 files changed, 15 insertions(+), 17 deletions(-)
diff --git a/tools/test
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.
Signed-off-by: Ilpo Järvinen
---
tools/testing/selftests/resctrl/cache.c | 6 +++---
tools/testing/selftests/resctrl/resctrl.h | 4 ++--
tools
1 - 100 of 379 matches
Mail list logo