Re: [PATCH v6 0/3] arm64: Add BRBE support for bpf_get_branch_snapshot()

From: James Clark

Date: Thu Nov 26 2026 - 07:40:00 EST




On 23/09/2026 17:46, Andrii Nakryiko wrote:
On Wed, Sep 23, 2026 at 2:15 AM James Clark <james.clark@xxxxxxxxxx> wrote:



On 22/09/2026 21:40, Andrii Nakryiko wrote:
On Tue, Sep 1, 2026 at 6:45 AM Puranjay Mohan <puranjay12@xxxxxxxxx> wrote:

Hi James,

Can you review this version of the patchset? It is implementing what
we discussed in the thread on the last version.


James, do you mind reviewing the patches again, seems like Puranjay
went with the implementation you suggested, would be nice to review
and ack, if it looks good to you.

Mark, Will, you guys seems to be designated as maintainers for
drivers/perf/arm_brbe.c, can you please take a look and give your
feedback as well? This is important and useful feature for newer arm64
CPUs, it would be great to get access to this functionality that we
had on x86-64 side for a long while now. Please help get this upstream
or, if it's not in the right shape, guide Puranjay towards a better
implementation. Thank you!


LGTM, and the Sashiko review is good too. It does conflict with the
FEAT_NMI patches on the list, and you'd have to disable NMIs but as it
stands right now it's ok.

Reviewed-by: James Clark <james.clark@xxxxxxxxxx>


Thank you, James! Mark, Will, do you have any suggestions on correct
sequencing of things and how we should proceed? Thanks!



+ Vladimir

Hi Mark, Will, Vladimir,

Any thoughts on this approach where NMIs need to be disabled? Alternatively we could do something like track where the PMU interrupts and BPF snapshots overlap and then discard the BRBE buffer and make sure they don't trample on each other etc, but it looks like it would be significantly more complicated.

Thanks
James