public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/26] selftests/resctrl: CAT test improvements & generalized test framework
@ 2023-11-20 11:13 Ilpo Järvinen
  2023-11-20 11:13 ` [PATCH v2 01/26] selftests/resctrl: Don't use ctrlc_handler() outside signal handling Ilpo Järvinen
                   ` (25 more replies)
  0 siblings, 26 replies; 62+ messages in thread
From: Ilpo Järvinen @ 2023-11-20 11:13 UTC (permalink / raw)
  To: linux-kselftest, Reinette Chatre, Shuah Khan, Shaopeng Tan,
	Maciej Wieczór-Retman, Fenghua Yu
  Cc: linux-kernel, Ilpo Järvinen

Hi all,

Here's v2 series to improve resctrl selftests with generalized test
framework and rewritten CAT test. In contrast to v1, this version does
not include L2 CAT test because it needs further work. In general, I
feel that v2 is in much better shape than v1 because I ended up
addressing a few small things beyond what came up during v1 review.

The series contains following improvements:

- Excludes shareable bits from CAT test allocation to avoid interference
- Replaces file "sink" with a volatile variable
- Alters read pattern to defeat HW prefetcher optimizations
- Rewrites CAT test to make the CAT test reliable and truly measure
  if CAT is working or not
- Introduces generalized test framework making easier to add new tests
- Lots of other cleanups & refactoring

This series have been tested across a large number of systems from
different generations.

v2:
- Postpone adding L2 CAT test as more investigations are necessary
- Add patch to remove ctrlc_handler() from wrong place
- Improvements to changelogs
- Function comments improvements & comment cleanups
- Move some parts of the changes into more logical patch
- If checks: buf == NULL -> !buf
- Variable naming:
        - p -> buf
        - cbm_mask_path -> cbm_path
- Function naming:
        - get_cbm_mask() -> get_full_cbm()
        - cache_size() -> cache_portion_size()
- Use PATH_MAX
- Improved cache_portion_size() parameter names
- int count -> unsigned int
- Pass filename to measurement taking functions instead of
  resctrl_val_param
- !lines ? : reversal
- Removed bogus static from function local variable
- Open perf fd only once, reset & enable in the innermost test loop
- Add perf fd ioctl() error handling
- Add patch to change compiler optimization prevention "sink" from file
  to volatile variable
- Remove cpu_no and resource (the latter was added in v1) members from
  resctrl_val_param (pass uparams and test where those are needed)
- Removed ARRAY_SIZE() macro
- Add patch to rename "resource_id" to "domain_id"

Ilpo Järvinen (26):
  selftests/resctrl: Don't use ctrlc_handler() outside signal handling
  selftests/resctrl: Split fill_buf to allow tests finer-grained control
  selftests/resctrl: Refactor fill_buf functions
  selftests/resctrl: Refactor get_cbm_mask() and rename to
    get_full_cbm()
  selftests/resctrl: Mark get_cache_size() cache_type const
  selftests/resctrl: Create cache_portion_size() helper
  selftests/resctrl: Exclude shareable bits from schemata in CAT test
  selftests/resctrl: Split measure_cache_vals()
  selftests/resctrl: Split show_cache_info() to test specific and
    generic parts
  selftests/resctrl: Remove unnecessary __u64 -> unsigned long
    conversion
  selftests/resctrl: Remove nested calls in perf event handling
  selftests/resctrl: Consolidate naming of perf event related things
  selftests/resctrl: Improve perf init
  selftests/resctrl: Convert perf related globals to locals
  selftests/resctrl: Move cat_val() to cat_test.c and rename to
    cat_test()
  selftests/resctrl: Open perf fd before start & add error handling
  selftests/resctrl: Replace file write with volatile variable
  selftests/resctrl: Read in less obvious order to defeat prefetch
    optimizations
  selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test
  selftests/resctrl: Create struct for input parameters
  selftests/resctrl: Introduce generalized test framework
  selftests/resctrl: Pass write_schemata() resource instead of test name
  selftests/resctrl: Add helper to convert L2/3 to integer
  selftests/resctrl: Rename resource ID to domain ID
  selftests/resctrl: Get domain id from cache id
  selftests/resctrl: Add test groups and name L3 CAT test L3_CAT

 tools/testing/selftests/resctrl/cache.c       | 274 +++++----------
 tools/testing/selftests/resctrl/cat_test.c    | 328 +++++++++++-------
 tools/testing/selftests/resctrl/cmt_test.c    |  76 +++-
 tools/testing/selftests/resctrl/fill_buf.c    | 132 ++++---
 tools/testing/selftests/resctrl/mba_test.c    |  26 +-
 tools/testing/selftests/resctrl/mbm_test.c    |  28 +-
 tools/testing/selftests/resctrl/resctrl.h     | 117 +++++--
 .../testing/selftests/resctrl/resctrl_tests.c | 205 +++++------
 tools/testing/selftests/resctrl/resctrl_val.c |  56 +--
 tools/testing/selftests/resctrl/resctrlfs.c   | 246 ++++++++-----
 10 files changed, 821 insertions(+), 667 deletions(-)

-- 
2.30.2


^ permalink raw reply	[flat|nested] 62+ messages in thread

end of thread, other threads:[~2023-12-07 18:35 UTC | newest]

Thread overview: 62+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 11:13 [PATCH v2 00/26] selftests/resctrl: CAT test improvements & generalized test framework Ilpo Järvinen
2023-11-20 11:13 ` [PATCH v2 01/26] selftests/resctrl: Don't use ctrlc_handler() outside signal handling Ilpo Järvinen
2023-11-28 22:09   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 02/26] selftests/resctrl: Split fill_buf to allow tests finer-grained control Ilpo Järvinen
2023-11-28 22:10   ` Reinette Chatre
2023-12-07 14:04     ` Ilpo Järvinen
2023-11-20 11:13 ` [PATCH v2 03/26] selftests/resctrl: Refactor fill_buf functions Ilpo Järvinen
2023-11-28 22:10   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 04/26] selftests/resctrl: Refactor get_cbm_mask() and rename to get_full_cbm() Ilpo Järvinen
2023-11-28 22:11   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 05/26] selftests/resctrl: Mark get_cache_size() cache_type const Ilpo Järvinen
2023-11-28 22:11   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 06/26] selftests/resctrl: Create cache_portion_size() helper Ilpo Järvinen
2023-11-28 22:11   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 07/26] selftests/resctrl: Exclude shareable bits from schemata in CAT test Ilpo Järvinen
2023-11-28 22:12   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 08/26] selftests/resctrl: Split measure_cache_vals() Ilpo Järvinen
2023-11-28 22:13   ` Reinette Chatre
2023-12-07 14:32     ` Ilpo Järvinen
2023-12-07 18:02       ` Reinette Chatre
2023-12-07 18:33         ` Ilpo Järvinen
2023-12-07 18:35           ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 09/26] selftests/resctrl: Split show_cache_info() to test specific and generic parts Ilpo Järvinen
2023-11-28 22:13   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 10/26] selftests/resctrl: Remove unnecessary __u64 -> unsigned long conversion Ilpo Järvinen
2023-11-28 22:14   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 11/26] selftests/resctrl: Remove nested calls in perf event handling Ilpo Järvinen
2023-11-28 22:15   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 12/26] selftests/resctrl: Consolidate naming of perf event related things Ilpo Järvinen
2023-11-28 22:15   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 13/26] selftests/resctrl: Improve perf init Ilpo Järvinen
2023-11-28 22:15   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 14/26] selftests/resctrl: Convert perf related globals to locals Ilpo Järvinen
2023-11-28 22:15   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 15/26] selftests/resctrl: Move cat_val() to cat_test.c and rename to cat_test() Ilpo Järvinen
2023-11-28 22:15   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 16/26] selftests/resctrl: Open perf fd before start & add error handling Ilpo Järvinen
2023-11-28 22:16   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 17/26] selftests/resctrl: Replace file write with volatile variable Ilpo Järvinen
2023-11-28 22:16   ` Reinette Chatre
2023-12-07 15:03     ` Ilpo Järvinen
2023-11-20 11:13 ` [PATCH v2 18/26] selftests/resctrl: Read in less obvious order to defeat prefetch optimizations Ilpo Järvinen
2023-11-28 22:17   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 19/26] selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test Ilpo Järvinen
2023-11-28 22:17   ` Reinette Chatre
2023-12-07 15:18     ` Ilpo Järvinen
2023-11-20 11:13 ` [PATCH v2 20/26] selftests/resctrl: Create struct for input parameters Ilpo Järvinen
2023-11-28 22:18   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 21/26] selftests/resctrl: Introduce generalized test framework Ilpo Järvinen
2023-11-28 22:19   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 22/26] selftests/resctrl: Pass write_schemata() resource instead of test name Ilpo Järvinen
2023-11-28 22:19   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 23/26] selftests/resctrl: Add helper to convert L2/3 to integer Ilpo Järvinen
2023-11-28 22:22   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 24/26] selftests/resctrl: Rename resource ID to domain ID Ilpo Järvinen
2023-11-28 22:22   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 25/26] selftests/resctrl: Get domain id from cache id Ilpo Järvinen
2023-11-28 22:22   ` Reinette Chatre
2023-11-20 11:13 ` [PATCH v2 26/26] selftests/resctrl: Add test groups and name L3 CAT test L3_CAT Ilpo Järvinen
2023-11-28 22:22   ` Reinette Chatre
2023-11-29 11:11     ` Ilpo Järvinen
2023-11-30  7:36       ` Maciej Wieczór-Retman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox