On Fri, 27 Oct 2023, Maciej Wieczór-Retman wrote:
On 2023-10-24 at 12:26:24 +0300, Ilpo Järvinen wrote:
diff --git a/tools/testing/selftests/resctrl/cat_test.c b/tools/testing/selftests/resctrl/cat_test.c index 2106cc3601d9..e71690a9bbb3 100644 --- a/tools/testing/selftests/resctrl/cat_test.c +++ b/tools/testing/selftests/resctrl/cat_test.c @@ -111,6 +111,77 @@ void cat_test_cleanup(void) remove(RESULT_FILE_NAME2); }
+/*
- cat_test: execute CAT benchmark and measure LLC cache misses
- @param: parameters passed to cat_test()
- @span: buffer size for the benchmark
- Return: 0 on success. non-zero on failure.
- */
+static int cat_test(struct resctrl_val_param *param, size_t span) +{
- int memflush = 1, operation = 0, ret = 0;
- char *resctrl_val = param->resctrl_val;
- static struct perf_event_read pe_read;
Is there a reason why this struct is declared as static?
Good catch.
I'll change the earlier patch which made the global -> local var move and failed to remove the static keyword.