Skip to content
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

cgroup2: rm/simplify some code #283

Merged
merged 2 commits into from
Apr 18, 2023
Merged

cgroup2: rm/simplify some code #283

merged 2 commits into from
Apr 18, 2023

Conversation

kolyshkin
Copy link
Contributor

@kolyshkin kolyshkin commented Apr 7, 2023

Please see individual commit messages for details.

This should make #381 way simpler

Functions readSingleFile and getPidValue are only used for two files:
pids.current and pids.max. It is easier and more efficient to use
getStatFileContentUint64 for the same purpose.

Switch to getStatFileContentUint64, remove the unused code.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Since all the values that we deal with are of the same type (uint64),
let's remove inteface{} and all those typecasts and accessor functions.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin kolyshkin changed the title cgroup2: rm some code cgroup2: rm/simplify some code Apr 8, 2023
Copy link
Member

@dims dims left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants