Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtime: add kernel user perf event array and per cpu array #68

Merged
merged 16 commits into from
Nov 6, 2023

Conversation

Officeyutong
Copy link
Contributor

@Officeyutong Officeyutong commented Nov 1, 2023

WIP

Todos:

  • Add support for kernel user per cpu array map
  • Add support for kernel user perf event map

Details

Shared perf event array map is implemented in such way:

  • It was backed with a real kernel perf event array, and a user ring buffer
  • When a userspace ebpf program wants to output to the perf array, it writes its data into the user ringbuffer.
  • A kernel ebpf program will be attached to an intervally-triggered perf event. It keeps draining data from the user ringbuffer, then (if available) output the data into the kernel perf event.

Use examples/libbpf-tools/bashreadline to test the shared user perf event array.

@victoryang00 victoryang00 marked this pull request as ready for review November 2, 2023 00:09
@yunwei37 yunwei37 marked this pull request as draft November 2, 2023 08:49
@yunwei37 yunwei37 marked this pull request as ready for review November 2, 2023 20:08
@yunwei37 yunwei37 changed the title Make deepflow work runtime: add perf event array and kernel user ring buffer Nov 2, 2023
@yunwei37 yunwei37 changed the title runtime: add perf event array and kernel user ring buffer runtime: add perf event array and user ring buffer Nov 2, 2023
@yunwei37 yunwei37 changed the title runtime: add perf event array and user ring buffer runtime: add perf event array and per cpu array Nov 2, 2023
@yunwei37 yunwei37 changed the title runtime: add perf event array and per cpu array runtime: add kernel user perf event array and per cpu array Nov 2, 2023
@Officeyutong Officeyutong marked this pull request as draft November 3, 2023 05:39
@Officeyutong Officeyutong marked this pull request as ready for review November 5, 2023 15:34
@yunwei37 yunwei37 merged commit 66b2403 into eunomia-bpf:master Nov 6, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants