Consider cgroup when determining memory usage#2006
Open
0intro wants to merge 1 commit intoOpenSCAP:maint-1.3from
Open
Consider cgroup when determining memory usage#20060intro wants to merge 1 commit intoOpenSCAP:maint-1.3from
0intro wants to merge 1 commit intoOpenSCAP:maint-1.3from
Conversation
Contributor
|
Hey, @0intro! Can you please rebase the PR? |
This change modifies the oscap_sys_memusage function to take into account the memory constraints of the cgroup. Both cgroup and cgroup2 are supported.
Contributor
Author
|
I've just rebased the change. |
Contributor
|
Okay, I understand the change, and I'm not particularly against it. But it will affect every invocation of the scanner everywhere as the scanner has a default memory limit for all operations. What we have right now could be not exactly correct, but it might be what is expected by the users however weird it is. And we don't really have a test even for the old behavior. How about you add a test that checks your particular use-case (the problem you're trying to solve)? We can then reason about preferred strategies on the new behavior. |
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.
This change modifies the
oscap_sys_memusagefunction to take into account the memory constraints of the cgroup. Both cgroup and cgroup2 are supported.