Remove incorrect cgroup filtering from runqlat#201
Merged
Conversation
…nstead of wakee Co-authored-by: yunwei37 <34985212+yunwei37@users.noreply.github.com>
Co-authored-by: yunwei37 <34985212+yunwei37@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix current task filter in runqlat implementation
Fix runqlat cgroup filter checking waker instead of wakee
Feb 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes runqlat’s cgroup filtering logic which previously filtered by the waker (current task) rather than the wakee (task being measured), leading to incorrect results.
Changes:
- Removed
bpf_current_task_under_cgroup()checks from wakeup/switch handlers to avoid filtering on the wrong task. - Kept
filter_cg/cgroup_mapfor compatibility but markedfilter_cgas deprecated/no-op in code and docs. - Updated English and Chinese READMEs to document the limitation and corrected examples.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/9-runqlat/runqlat.bpf.c |
Removes incorrect cgroup checks and documents filter_cg as deprecated/no-op while keeping API surface. |
src/9-runqlat/README.md |
Updates examples and documentation to reflect removal of incorrect cgroup filtering and its kernel requirements. |
src/9-runqlat/README.zh.md |
Same as above for the Chinese documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…-filter_cg is no-op Co-authored-by: yunwei37 <34985212+yunwei37@users.noreply.github.com>
Member
|
不要考虑什么后向兼容,你就把所有相关的都给从文档和代码里面移除就好了 @copilot |
Co-authored-by: yunwei37 <34985212+yunwei37@users.noreply.github.com>
Contributor
Author
Copilot
AI
changed the title
Fix runqlat cgroup filter checking waker instead of wakee
Remove incorrect cgroup filtering from runqlat
Feb 12, 2026
yunwei37
approved these changes
Feb 12, 2026
This was referenced Feb 23, 2026
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.
Remove incorrect cgroup filtering from runqlat
Analysis
The issue is in the
runqlatimplementation wherebpf_current_task_under_cgroup()was incorrectly used to filter tasks.Problem:
sched_wakeupandsched_wakeup_newhandlers, the code checked if the current task (the waker) is in the target cgrouprunqlatmeasures the delay for the woken task (parameterp), not the wakerSolution:
filter_cgvariable andcgroup_mapfrom the codebaseChanges Made
handle_sched_wakeup()- removed incorrect cgroup checkhandle_sched_wakeup_new()- removed incorrect cgroup checkhandle_switch()- removed incorrect cgroup checkfilter_cgvariable completely from codecgroup_mapBPF map completely from code--filter_cgfrom usage examples in both languagesThe cgroup filtering feature has been completely removed as it was fundamentally incorrect and could not be properly implemented with the available BPF helpers. Users should use process ID filtering instead if needed.
Original prompt
sched_wakeupandsched_switchcontext? #185💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.