fix(ebpf): capture issuer PID at I/O issue, not completion#632
Open
yairfalse wants to merge 1 commit into
Open
fix(ebpf): capture issuer PID at I/O issue, not completion#632yairfalse wants to merge 1 commit into
yairfalse wants to merge 1 commit into
Conversation
yairfalse
commented
May 3, 2026
Collaborator
Author
yairfalse
left a comment
There was a problem hiding this comment.
LGTM (review-only — self-authored, can't formally approve).
Verified the struct alignment after adding issuer_pid:
issue_ns(u64) at 0,cgroup_id(u64) at 8,bytes(u32) at 16,issuer_pid(u32) at 20,opcode(u8) at 24,padding[7]at 25-31 → 32 bytes total, 8-byte aligned. Clean.
io_value is internal to the BPF program (not crossed to Rust), so the userspace storage_event layout is unchanged. Memory cost is ~80KB extra across the 10k-entry inflight_io LRU map — negligible.
Note for whoever merges: this repo has no CI, so please run clang -O2 -g -target bpf -D__TARGET_ARCH_x86 -I ebpf/headers -c ebpf/storage_monitor.c -o /tmp/out.o locally to confirm the program still compiles before merging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why
block_rq_complete commonly runs in softirq context, where current may be unrelated to the process that issued the I/O. Capturing the issuer PID at issue time keeps storage anomaly events attributed to the correct process.
Test plan