]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
perf/amd/ibs: Enable fetch latency filtering
authorRavi Bangoria <ravi.bangoria@amd.com>
Mon, 16 Feb 2026 04:25:27 +0000 (04:25 +0000)
committerPeter Zijlstra <peterz@infradead.org>
Sat, 28 Feb 2026 11:03:29 +0000 (12:03 +0100)
commit35247fa60b74e1c643423c3bc7c6a59cbca262bb
treeb1756718b0ccd5e1a1c67e6cc79f394096dd54d3
parentefa5700ec0da66662dc8375fe4e4b888487a6b84
perf/amd/ibs: Enable fetch latency filtering

IBS Fetch on future hardware adds fetch latency filtering which
generates interrupt only when FetchLat value exceeds a programmable
threshold.

Hardware allows threshold in 128-cycle increment (i.e. 128, 256, 384
etc.) from 128 to 1920 cycles. Like the existing IBS filters, samples
that fail the latency test are dropped and IBS restarts internally.

Since hardware supports threshold in multiple of 128, add a software
filter on top to support latency threshold with the granularity of 1
cycle in between [128-1920].

Example:
  # perf record -e ibs_fetch/fetchlat=128/ -c 10000 -a -- sleep 5

Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/20260216042530.1546-5-ravi.bangoria@amd.com
arch/x86/events/amd/ibs.c