iovisor / iovisor/bcc

[Feature request] Bulk polling API for perf ring buffer

Open
#3,793 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Perf ring buffer (or perf buffer) created with BPF_PERF_OUTPUT(). BPF runtime can submit events to perf buffer via perf_submit() API. Userspace call PerfBuffer::poll() to invoke callbacks assigned during the initialization of the perf buffer.

IIUC, the perf buffer polling will repetitively invoke the callback on each and every event in the perf buffer. That can be wasteful when there is a lot of events flowing through the perf buffer.

Instead, I am wondering if a bulk polling API would be more efficient.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the BPF_PERF_OUTPUT() and perf_submit() flow, then trace the userspace PerfBuffer::poll() entry point and its callback behavior. The payload names no files or tests, so locate the relevant implementation and coverage before defining the bulk API. Done means the API scope, callback semantics, and validation approach are agreed and implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
observability-sre, operating-systems, performance
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.