The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Ravi Bangoria <ravi.bangoria@amd.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Ian Rogers <irogers@google.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users@vger.kernel.org,
	Ravi Bangoria <ravi.bangoria@amd.com>
Subject: Re: [PATCH v2] perf test: Add AMD IBS sw filter test
Date: Sat, 24 May 2025 15:17:13 +0530	[thread overview]
Message-ID: <960adb81-2c77-4e77-b685-b3f3005cb286@amd.com> (raw)
In-Reply-To: <20250524002754.1266681-1-namhyung@kernel.org>

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@amd.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.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

  reply	other threads:[~2025-05-24  9:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-24  0:27 [PATCH v2] perf test: Add AMD IBS sw filter test Namhyung Kim
2025-05-24  9:47 ` Ravi Bangoria [this message]
2025-05-27 20:51   ` Arnaldo Carvalho de Melo
2025-05-28 18:35     ` Namhyung Kim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=960adb81-2c77-4e77-b685-b3f3005cb286@amd.com \
    --to=ravi.bangoria@amd.com \
    --cc=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=irogers@google.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox