From: Huang Shijie <huangsj@hygon.cn>
To: <peterz@infradead.org>, <mingo@redhat.com>, <acme@kernel.org>,
<namhyung@kernel.org>, <ravi.bangoria@amd.com>
Cc: <zhongyuan@hygon.cn>, <fangbaoshun@hygon.cn>,
<yingzhiwei@hygon.cn>, <mark.rutland@arm.com>,
<alexander.shishkin@linux.intel.com>, <jolsa@kernel.org>,
<irogers@google.com>, <adrian.hunter@intel.com>,
<james.clark@linaro.org>, <tglx@kernel.org>, <bp@alien8.de>,
<dave.hansen@linux.intel.com>, <x86@kernel.org>, <hpa@zytor.com>,
<linux-perf-users@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <liuqi@hygon.cn>,
<lijing@hygon.cn>, <wangfengyu@hygon.cn>, <wujianyong@hygon.cn>,
<shijie8@gmail.com>, <1537577747@qq.com>, <huangsj@hygon.cn>
Subject: Re: [PATCH] perf/amd/ibs: add phy_addr_only software filter for ibs_op
Date: Thu, 29 Oct 2026 19:17:37 +0800 [thread overview]
Message-ID: <auMrUXp42Djz3zu9@hsj-2U-Workstation> (raw)
In-Reply-To: <20260902085251.4046240-1-huangsj@hygon.cn>
Hi Ravi,
> Can you please confirm if those additional samples are genuinely valid.
Yes.
To answer this properly I re-ran the mysql test,
and verified the physical address of every captured sample against
the System RAM ranges in /proc/iomem.
Setup: 384-CPU Hygon box, v7.3-based kernel, MySQL 8 under sysbench
oltp_read_only, 400 threads. Each round is a fresh 60s
sysbench run; after 15s of warmup, perf records ibs_op for 3s:
$ perf record -e ibs_op/phy_addr_only=1/ -c 100000 --phys-data \
-p <mysqld> # my patch
$ perf record -e ibs_op// --phys-data --filter 'phys_addr != 0' \
-c 100000 -p <mysqld> # your suggestion
Rounds alternate p1 -> b1 -> p2 -> b2 -> p3 -> b3 so both methods see
the same load conditions. Each record's phys_addr is then dumped with
"perf script -F pid,tid,phys_addr" and bisect-checked against the
System RAM ranges (read from /proc/iomem as root).
samples phys_addr==0 non-zero in
round filter captured (valid=1,MSR=0) System RAM
----- -------- --------- --------------- -----------
p1 phy_only 15710042 0.10 % 98.61 %
b1 bpf 14041851 0.00 % 98.55 %
p2 phy_only 15580497 0.10 % 98.56 %
b2 bpf 15416187 0.00 % 98.58 %
p3 phy_only 15732582 0.10 % 98.59 %
b3 bpf 15447397 0.00 % 98.58 %
Two observations:
1. The validity ratio is identical for both methods. Of the non-zero
addresses phy_addr_only delivers, 98.6 % fall inside System RAM --
the same ratio the BPF-filtered set shows.
2. The only set-level difference is 0.10 % of samples where
dc_phy_addr_valid is set but IBSDCPHYSAD reads 0.
Thanks,
Huang Shijie
prev parent reply other threads:[~2026-10-29 11:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-02 8:52 [PATCH] perf/amd/ibs: add phy_addr_only software filter for ibs_op Huang Shijie
2026-09-02 9:15 ` sashiko-bot
2026-10-27 9:14 ` Ravi Bangoria
2026-10-28 7:52 ` Huang Shijie
2026-10-29 4:08 ` Ravi Bangoria
2026-10-29 11:17 ` Huang Shijie [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=auMrUXp42Djz3zu9@hsj-2U-Workstation \
--to=huangsj@hygon.cn \
--cc=1537577747@qq.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=fangbaoshun@hygon.cn \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=lijing@hygon.cn \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=liuqi@hygon.cn \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
--cc=shijie8@gmail.com \
--cc=tglx@kernel.org \
--cc=wangfengyu@hygon.cn \
--cc=wujianyong@hygon.cn \
--cc=x86@kernel.org \
--cc=yingzhiwei@hygon.cn \
--cc=zhongyuan@hygon.cn \
/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