Repository navigation
0.24.2: avoid unrelated RSS reads during unit memory observation - #50
Merged
Merged
Conversation
This was referenced Nov 5, 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.
The unit memory observer opens
/proc/<pid>/statfor every visible process before discarding records from unrelated process groups. An image compiler worker starts this observer for its own supervised unit, multiplying the unrelated record reads across short-lived workers.Query each visible PID's process group first. A successful mismatch skips its RSS record; a failed query retains the existing record-reading path, and potential members still have their group checked in the same record used for RSS. Keep complete process-group membership, immediate initial sampling, the 100/200/500 ms cadence, summed memory and whole-unit termination. The C surface and resource properties are unchanged. Prepare package 0.24.2 and align the usage example and observation description.
Validation:
kal_process_job_usagecontrols cover unrelated groups, siblings joining/leaving and surviving members after the leader exits. EPERM and ENOSYS seccomp controls retain exact membership and memory through the fallback.kal_process_job_limit/task/memory implementation controls terminate both non-leader members when their sum exceeds the ceiling, including both denied-query controls; an unrelated unit survives. No single-member shortcut or delayed first observation.git diff --checkpass. Full repository CI remains the merge gate.Part of the remaining performance diagnosis for mcpp-community/mcpp#885. Publication and downstream adoption follow successful checks and exact-host workload evidence; no release is claimed by this PR.