Skip to content

Added cgroups v2 CPU implementation.#107

Merged
AkihiroSuda merged 1 commit intocontainerd:masterfrom
Zyqsempai:104-add-v2-cgroups-for-cpu
Nov 5, 2019
Merged

Added cgroups v2 CPU implementation.#107
AkihiroSuda merged 1 commit intocontainerd:masterfrom
Zyqsempai:104-add-v2-cgroups-for-cpu

Conversation

@Zyqsempai
Copy link
Contributor

Partially fixes #104
Added cgroups v2 CPU implementation.

Signed-off-by: bpopovschi zyqsempai@mail.ru

@Zyqsempai
Copy link
Contributor Author

@AkihiroSuda Can you add some acceptance criteria or checkpoints what should be done, for easier testing and validation for this and next PR's.

@codecov-io
Copy link

codecov-io commented Nov 4, 2019

Codecov Report

Merging #107 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #107   +/-   ##
=======================================
  Coverage   45.42%   45.42%           
=======================================
  Files          23       23           
  Lines        1638     1638           
=======================================
  Hits          744      744           
  Misses        768      768           
  Partials      126      126

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fb48e1...8f1875b. Read the comment docs.

@AkihiroSuda
Copy link
Member

Please add to

func defaults(unifiedMountpoint string) ([]Subsystem, map[Name]error) {

@AkihiroSuda
Copy link
Member

wrt tests I think we can add metrics code to cmd/cgroups-playground and call it a day.

In future we should have proper Go tests

Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

@Zyqsempai
Copy link
Contributor Author

@AkihiroSuda The problem is that https://github.com/opencontainers/runtime-spec/blob/master/specs-go/config.go#L297 this config still not updated to v2.
Should I open an issue and corresponding PR to runtime-spec?
For example how it's done in runc https://github.com/opencontainers/runc/blob/master/libcontainer/configs/cgroup_linux.go#L123

@AkihiroSuda
Copy link
Member

@Zyqsempai
Copy link
Contributor Author

@AkihiroSuda PTAL

@AkihiroSuda
Copy link
Member

thanks, just a couple of nits

@Zyqsempai Zyqsempai force-pushed the 104-add-v2-cgroups-for-cpu branch from a6dfc80 to cc3ea3c Compare November 5, 2019 10:02
@Zyqsempai
Copy link
Contributor Author

@AkihiroSuda Thanks for your reviews. Done.

@Zyqsempai Zyqsempai force-pushed the 104-add-v2-cgroups-for-cpu branch from cc3ea3c to 1be6fb4 Compare November 5, 2019 10:16
Copy link
Member

@AkihiroSuda AkihiroSuda left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@Zyqsempai Zyqsempai force-pushed the 104-add-v2-cgroups-for-cpu branch from 1be6fb4 to 8f1875b Compare November 5, 2019 10:21
Signed-off-by: bpopovschi <zyqsempai@mail.ru>
@crosbymichael
Copy link
Member

One thing before we go farther on this. Should v2 be simpler where we don't have separate files/controllers, cpu.go/memory.go but a single manager.go with all the settings?

@AkihiroSuda
Copy link
Member

Good idea, could you open PR? (maybe after merging this one)

@crosbymichael
Copy link
Member

Ya, I think we should merge then one and then i can work on a unified manager :)

@crosbymichael
Copy link
Member

LGTM

@AkihiroSuda after this last edit, does it still LGTM for you?

@AkihiroSuda AkihiroSuda merged commit 2ff88b8 into containerd:master Nov 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cgroup2: check list for v2 controller implementations

4 participants