All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Ravi Bangoria <ravi.bangoria@amd.com>,
	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
Subject: Re: [PATCH v2] perf test: Add AMD IBS sw filter test
Date: Wed, 28 May 2025 11:35:16 -0700	[thread overview]
Message-ID: <aDdXZJrPSJlCAcTs@google.com> (raw)
In-Reply-To: <aDYlyY2UbBxcMb9f@x1>

On Tue, May 27, 2025 at 05:51:21PM -0300, Arnaldo Carvalho de Melo wrote:
> On Sat, May 24, 2025 at 03:17:13PM +0530, Ravi Bangoria wrote:
> > 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 :)
> 
> Right, something else, maybe one of those workloads:
> 
> acme@number:~/git/perf-tools-next$ perf test --list-workloads
> noploop
> thloop
> leafloop
> sqrtloop
> brstack
> datasym
> landlock
> acme@number:~/git/perf-tools-next$
> 
> root@number:~# time perf record -e ibs_op/swfilt/u perf test -w sqrtloop
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.160 MB perf.data (3976 samples) ]
> 
> real	0m1.588s
> user	0m1.407s
> sys	0m0.161s
> root@number:~# perf script | wc -l
> 3976
> root@number:~#
> 
> But I'm applying the patch as is, we can replace the workload later.

Thanks, I can add some workload to create both kernel and user traffic.
I think the current workloads run in user space mostly.

Thanks,
Namhyung


      reply	other threads:[~2025-05-28 18:35 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
2025-05-27 20:51   ` Arnaldo Carvalho de Melo
2025-05-28 18:35     ` Namhyung Kim [this message]

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=aDdXZJrPSJlCAcTs@google.com \
    --to=namhyung@kernel.org \
    --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=peterz@infradead.org \
    --cc=ravi.bangoria@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.