-
Notifications
You must be signed in to change notification settings - Fork 184
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
[DO NOT MERGE] Ringbuf redux #1687
Draft
dave-tucker
wants to merge
3
commits into
sustainable-computing-io:main
Choose a base branch
from
dave-tucker:ringbuf-redux
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[DO NOT MERGE] Ringbuf redux #1687
dave-tucker
wants to merge
3
commits into
sustainable-computing-io:main
from
dave-tucker:ringbuf-redux
Conversation
This file contains 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
This uses a ring buffer to send events from eBPF back to userspace. Doing so allows for our eBPF probes to complete quickly, and pushes all delta calculation and summary back into userspace. Moves the logic that resolves comm from procfs into its own pkg. In addition, a cache is added to avoid hitting procfs every time we update process metrics. Removes the bpftest pkg and includes the test programs in the main kepler.bpf.c file. This prevents drift in the go generate flags and generally makes it easier to write tests. Signed-off-by: Dave Tucker <[email protected]>
The resolves pid 0 to system_processes without (throwing) any error since there is no command associated with it. This commit fixes the following log I0802 03:24:03.647656 733341 process_bpf_collector.go:100] failed to resolve comm for PID 0: process not running: stat /proc/0: no such file or directory, set comm=system_processes I0802 03:24:03.648079 733341 process_bpf_collector.go:100] failed to resolve comm for PID 0: process not running, set comm=system_processes 0802 process_bpf_collector.go:100] failed to resolve comm for PID 0: process not running: stat /proc/0: no such file or directory, set comm=system_processes ... I0802 process_bpf_collector.go:100] failed to resolve comm for PID 0: process not running, set comm=system_processes Signed-off-by: Sunil Thaha <[email protected]>
…#1671) Processing events in the same goroutine as the ring buffer reader requires acquiring a mutex, which blocks ringbuf event processing causing a backlog. To avoid this, send events via a buffered channel to a dedicated event processing goroutine to ensure that the ringbuf remains unblocked. This has decreased CPU load from 1-3% on my machine to 0-1% CPU load. Signed-off-by: Dave Tucker <[email protected]>
🤖 SeineSailor Here is a concise summary of the pull request changes: The "[DO NOT MERGE] Ringbuf redux" pull request reintroduces the ring buffer functionality to the codebase, affecting the build process, testing procedures, and internal implementation. Key modifications include:
Observations and suggestions for improvement:
|
should we start a new branch for this change? |
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.
Brings back the ringbuf work, just to see if it's something we want to continue with or not.