Skip to content

improve and fix barriers for walking perf ring buffer

Daniel Borkmann netdev 2 versions – Applied

Status from this message: Applied, Thanks

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyApplied
  2. v13 patches 14 repliesSuperseded

Changes in v2 from the cover letter

- add common helper and switch to acquire/release variants when possible, thanks Peter!

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/2tools, perf: add and use optimized ring_buffer_{read_head,write_tail} helperstools/arch/arm64/include/asm/barrier.h tools/arch/ia64/include/asm/barrier.h tools/arch/powerpc/include/asm/barrier.h +6 more+250 -120 replies
2/2bpf, libbpf: use correct barriers in perf ring buffer walktools/lib/bpf/libbpf.c+4 -60 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchPeter Zijlstra (Intel)
1/2A-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH bpf-next v2 0/2] improve and fix barriers for walking perf ring buffer

This set first adds smp_* barrier variants to tools infrastructure and updates perf and libbpf to make use of them. For details, please see individual patches, thanks!

Arnaldo, if there are no objections, could this be routed via bpf-next with Acked-by's due to later dependencies in libbpf? Alternatively, I could also get the 2nd patch out during merge window, but perhaps it's okay to do in one go as there shouldn't be much conflict in perf itself.

Thanks!

v1 -> v2:
- add common helper and switch to acquire/release variants when possible, thanks Peter!

Daniel Borkmann (2):
tools, perf: add and use optimized ring_buffer_{read_head,write_tail} helpers bpf, libbpf: use correct barriers in perf ring buffer walk

 tools/arch/arm64/include/asm/barrier.h    | 70 +++++++++++++++++++++++++++++
 tools/arch/ia64/include/asm/barrier.h     | 13 ++++++
 tools/arch/powerpc/include/asm/barrier.h  | 16 +++++++
 tools/arch/s390/include/asm/barrier.h     | 13 ++++++
 tools/arch/sparc/include/asm/barrier_64.h | 13 ++++++
 tools/arch/x86/include/asm/barrier.h      | 14 ++++++
 tools/include/asm/barrier.h               | 35 +++++++++++++++
 tools/include/linux/ring_buffer.h         | 73 +++++++++++++++++++++++++++++++
 tools/lib/bpf/libbpf.c                    | 10 ++---
 tools/perf/util/mmap.h                    | 15 ++-----
 10 files changed, 254 insertions(+), 18 deletions(-)
 create mode 100644 tools/include/linux/ring_buffer.h
Signature · 1 line
2.9.5