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

cgroup: support to set threaded mode in cgroup v2 #91

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

yaoyinnan
Copy link
Member

Support to set threaded mode in cgroup v2. The premise of switching to threaded mode is that only the cgroup of cpuset, cpu and pids is supported.

Fixes: #90

Signed-off-by: yaoyinnan yaoyinnan@foxmail.com

@yaoyinnan
Copy link
Member Author

/test

src/cgroup.rs Outdated Show resolved Hide resolved
src/cgroup.rs Outdated Show resolved Hide resolved
src/cgroup.rs Outdated Show resolved Hide resolved
@YushuoEdge
Copy link

Has cgroup v2 threaded mode supported in the upstream cgroup-rs repository?

@yaoyinnan
Copy link
Member Author

Has cgroup v2 threaded mode supported in the upstream cgroup-rs repository?

May I ask which upstream cgroups-rs repository you are referring to?

Copy link

@YushuoEdge YushuoEdge left a comment

Choose a reason for hiding this comment

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

Thanks! I have some questions and comments:

src/cgroup.rs Outdated Show resolved Hide resolved
src/cgroup.rs Show resolved Hide resolved
src/cgroup.rs Outdated Show resolved Hide resolved
src/cgroup.rs Outdated Show resolved Hide resolved
@YushuoEdge
Copy link

levex/cgroup-rs, which this repository is forked from?

@yaoyinnan
Copy link
Member Author

yaoyinnan commented Nov 29, 2022

levex/cgroup-rs, which this repository is forked from?

https://github.com/levex/cgroups-rs and https://github.com/ordovicia/controlgroup-rs of fork from levex has not been updated for a long time, and now the latest cgroups-rs library should be under kata-containers.

@YushuoEdge
Copy link

levex/cgroup-rs, which this repository is forked from?

levex/cgroups-rs and ordovicia/controlgroup-rs of fork from levex has not been updated for a long time, and now the latest cgroups-rs library should be under kata-containers.

OK! 👍

@yaoyinnan yaoyinnan force-pushed the 90/ftr/threaded-mode branch 4 times, most recently from 99ad423 to bc724f4 Compare December 1, 2022 06:05
@yaoyinnan yaoyinnan force-pushed the 90/ftr/threaded-mode branch 2 times, most recently from b5c1489 to 7560915 Compare December 1, 2022 07:43
@yaoyinnan
Copy link
Member Author

@lifupan @YushuoEdge @gaohuatao-1 I have processed all the comments, please help me to review again. Thanks.

src/cgroup.rs Outdated Show resolved Hide resolved
@yaoyinnan yaoyinnan force-pushed the 90/ftr/threaded-mode branch from 7560915 to 4c5b6ff Compare December 2, 2022 09:13
Copy link
Member

@studychao studychao left a comment

Choose a reason for hiding this comment

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

Thanks @yaoyinnan , a few more comments.

src/cgroup.rs Outdated Show resolved Hide resolved
src/cgroup.rs Outdated Show resolved Hide resolved
src/cgroup.rs Outdated Show resolved Hide resolved
src/cgroup_builder.rs Show resolved Hide resolved
@yaoyinnan yaoyinnan force-pushed the 90/ftr/threaded-mode branch 2 times, most recently from 224a7a1 to 1310090 Compare December 5, 2022 13:29
Copy link
Member

@studychao studychao left a comment

Choose a reason for hiding this comment

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

LGTM

src/cgroup.rs Outdated Show resolved Hide resolved
@yaoyinnan yaoyinnan force-pushed the 90/ftr/threaded-mode branch 3 times, most recently from 47a75b2 to 574bcb0 Compare December 30, 2022 03:52
Support to set threaded mode in cgroup v2. The premise of switching to threaded mode is that only the cgroup of cpuset, cpu and pids is supported.

Fixes: kata-containers#90

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
@yaoyinnan yaoyinnan force-pushed the 90/ftr/threaded-mode branch from 574bcb0 to c9d02af Compare December 30, 2022 04:46
Copy link

@YushuoEdge YushuoEdge left a comment

Choose a reason for hiding this comment

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

LGTM!

@liubin liubin merged commit 1211754 into kata-containers:main Jan 5, 2023
Tim-Zhang added a commit to Tim-Zhang/cgroups-rs that referenced this pull request Jan 11, 2023
To include patches kata-containers#91, kata-containers#94, kata-containers#98, kata-containers#99

Signed-off-by: Tim Zhang <tim@hyper.sh>
@Tim-Zhang Tim-Zhang mentioned this pull request Jan 11, 2023
@Tim-Zhang
Copy link
Member

@yaoyinnan This patch has been released in version 0.2.12, thanks

Tim-Zhang added a commit to Tim-Zhang/cgroups-rs that referenced this pull request Jan 11, 2023
Bump the major version for API changed in kata-containers#91.

Signed-off-by: Tim Zhang <tim@hyper.sh>
@Tim-Zhang Tim-Zhang mentioned this pull request Jan 11, 2023
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.

Support to set threaded mode in cgroup v2
7 participants