Skip to content

WIP: Use BPF ringbuf to transmit trace events from kernel to userspace#1339

Open
christos68k wants to merge 6 commits intoopen-telemetry:mainfrom
christos68k:ck/ringbuf
Open

WIP: Use BPF ringbuf to transmit trace events from kernel to userspace#1339
christos68k wants to merge 6 commits intoopen-telemetry:mainfrom
christos68k:ck/ringbuf

Conversation

@christos68k
Copy link
Copy Markdown
Member

@christos68k christos68k commented Apr 9, 2026

Summary

Switches our trace event transmission logic from perf events to BPF ringbuf.

I tried to keep existing semantics regarding the following two behaviors, and if we decide to pursue changes there, I'd rather we open follow-up PRs as I want to keep this PR as simple as possible in terms of semantic changes:

  1. The polling logic in events.go can be reworked to rely on the 'adaptive' ringbuffer notifications and a deadline (instead of a ticker)
  2. We could look into using bpf_ringbuf_reserve/bpf_ringbuf_submit instead of bpf_ringbuf_output (building the trace incrementally inside the reserved region).

I have one or two more TODOs to address but feel free to review.

CC: @gnurizen

@christos68k christos68k marked this pull request as draft April 9, 2026 19:44
@christos68k christos68k force-pushed the ck/ringbuf branch 2 times, most recently from 93cc658 to 4cf4bfa Compare April 9, 2026 19:47
@christos68k christos68k marked this pull request as ready for review April 9, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant