[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <960adb81-2c77-4e77-b685-b3f3005cb286@amd.com>
Date: Sat, 24 May 2025 15:17:13 +0530
From: Ravi Bangoria <ravi.bangoria@....com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Arnaldo Carvalho de Melo <acme@...nel.org>,
 Ian Rogers <irogers@...gle.com>, Kan Liang <kan.liang@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
 Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...nel.org>,
 LKML <linux-kernel@...r.kernel.org>, linux-perf-users@...r.kernel.org,
 Ravi Bangoria <ravi.bangoria@....com>
Subject: Re: [PATCH v2] perf test: Add AMD IBS sw filter test
Hi Namhyung,
On 24-May-25 5:57 AM, Namhyung Kim wrote:
> The kernel v6.14 added 'swfilt' to support privilege filtering in
> software so that IBS can be used by regular users.  Add a test case in
> x86 to verify the behavior.
> 
>   $ sudo perf test -vv 'IBS software filter'
>   113: AMD IBS software filtering:
>   --- start ---
>   test child forked, pid 178826
>   check availability of IBS swfilt
>   run perf record with modifier and swfilt
>   [ perf record: Woken up 3 times to write data ]
>   [ perf record: Captured and wrote 0.000 MB /dev/null ]
>   [ perf record: Woken up 3 times to write data ]
>   [ perf record: Captured and wrote 0.000 MB /dev/null ]
>   [ perf record: Woken up 3 times to write data ]
>   [ perf record: Captured and wrote 0.000 MB /dev/null ]
>   [ perf record: Woken up 0 times to write data ]
>   [ perf record: Captured and wrote 0.000 MB /dev/null ]
>   check number of samples with swfilt
>   [ perf record: Woken up 3 times to write data ]
>   [ perf record: Captured and wrote 0.037 MB - ]
>   [ perf record: Woken up 3 times to write data ]
>   [ perf record: Captured and wrote 0.041 MB - ]
>   ---- end(0) ----
>   113: AMD IBS software filtering                                      : Ok
> 
> Cc: Ravi Bangoria <ravi.bangoria@....com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Reviewed-by: Ravi Bangoria <ravi.bangoria@....com>
A minor nit below ...
> +echo "check number of samples with swfilt"
> +
> +kernel_sample=$(perf record -e ibs_op/swfilt/u -o- true | perf script -i- -F misc | grep -c ^K)
"true" barely runs in userspace. So, many a times this "perf record"
generates no samples :)
Thanks,
Ravi
Powered by blists - more mailing lists
 
