lkml.org 
[lkml]   [2023]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/24] selftests/resctrl: Move cat_val() to cat_test.c and rename to cat_test()
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.

--
i.
\
 
 \ /
  Last update: 2023-10-27 14:18    [W:0.066 / U:0.948 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site