Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

skip set cpu.weight when cpu.idle is enabled in cgroups v2#4143

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
qdaxb wants to merge1 commit intoopencontainers:main
base:main
Choose a base branch
Loading
fromqdaxb:main

Conversation

@qdaxb
Copy link

In cgroups v2, settingcpu.weight whencpu.idle==1 will fail withInvalid argument

This pr fixed this situation, consistent withhttps://github.com/opencontainers/runc/blob/main/libcontainer/cgroups/systemd/v2.go#L119

@qdaxbqdaxbforce-pushed themain branch 2 times, most recently from9079199 tod255be9CompareDecember 12, 2023 16:48
@mrunalp
Copy link
Contributor

Instead of silently skipping we should fail as a validation error.

@qdaxb
Copy link
Author

qdaxb commentedDec 13, 2023
edited
Loading

Instead of silently skipping we should fail as a validation error.

@mrunalp Thanks for reply.

I'm still a little confused about theidle parameter.

There is no description in thespec thatshares andidle cannot be applied at the same time. But If I set bothshares andidle, systemd driver and fs2 driver will behave differently.

system\driversystemd/v2fs2/cpu
support idle & systemd < 252systemd:set cpu.weight=1
fsMgr:set cpu.idle=1 & return error
set cpu.idle=1 & return error
support idle & systemd > 252systemd:set cpu.idle=1
fsMgr:set cpu.idle=1 & return error
set cpu.idle=1 & return error
not support idlereturn errorreturn error

So I think fs2 should be compatible with this situation like systemd, or directly add a hint in the document that they cannot be used at the same time?

@AkihiroSuda
Copy link
Member

Instead of silently skipping we should fail as a validation error.

Should be a warning to avoid breaking compatibility?

@kolyshkin
Copy link
Contributor

Yes, this should probably be a warning. I'm going to carry this into#4227.

@kolyshkin
Copy link
Contributor

There's no need for a warning. The problem is,Set is called duringrunc update with a combination of old and new settings, and thus it's normal for cpuweight and cpuidle both being set.

This PR needs a test case though. Can you add one@qdaxb ?

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@qdaxb@mrunalp@AkihiroSuda@kolyshkin

[8]ページ先頭

©2009-2025 Movatter.jp