Skip to content

cgroup2: rm/simplify some code#283

Merged
dims merged 2 commits intocontainerd:mainfrom
kolyshkin:v2-rm-code
Apr 18, 2023
Merged

cgroup2: rm/simplify some code#283
dims merged 2 commits intocontainerd:mainfrom
kolyshkin:v2-rm-code

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 <[email protected]>
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 <[email protected]>
@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

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants