[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1778225d-87b3-fb97-5512-e78ff46d169f@intel.com>
Date: Fri, 21 Apr 2023 17:16:40 -0700
From: Reinette Chatre <reinette.chatre@...el.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>,
<linux-kselftest@...r.kernel.org>,
Fenghua Yu <fenghua.yu@...el.com>,
"Shuah Khan" <shuah@...nel.org>, <linux-kernel@...r.kernel.org>
CC: Shaopeng Tan <tan.shaopeng@...fujitsu.com>
Subject: Re: [PATCH v2 13/24] selftests/resctrl: Add flush_buffer() to
fill_buf
Hi Ilpo,
On 4/18/2023 4:44 AM, Ilpo Järvinen wrote:
> Currently, flushing is only done after allocating and filling the
> buffer and cannot be controlled by the test cases.
>
> The new CAT test will want to control flushing within a test so
> introduce flush_buffer() for that purpose.
>
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> ---
> tools/testing/selftests/resctrl/fill_buf.c | 5 +++++
> tools/testing/selftests/resctrl/resctrl.h | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/tools/testing/selftests/resctrl/fill_buf.c b/tools/testing/selftests/resctrl/fill_buf.c
> index 677e1a113629..7e0d3a1ea555 100644
> --- a/tools/testing/selftests/resctrl/fill_buf.c
> +++ b/tools/testing/selftests/resctrl/fill_buf.c
> @@ -58,6 +58,11 @@ static void mem_flush(void *p, size_t s)
> sb();
> }
>
> +void flush_buffer(unsigned long long span)
> +{
> + mem_flush(startptr, span);
> +}
> +
I do not think this indirection is needed. In the same spirit of feedback
to previous patches a test can manage its own buffer pointer
and flush it by calling mem_flush() directly.
Reinette
Powered by blists - more mailing lists