Commit Graph

23 Commits

Author SHA1 Message Date
Xuewei Niu
b8031f1a21 fs: Move all files to fs subdirectory
Prepare to implement FsManager, which should be done in the following-up
commits. Apart from that, no code is not modified.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2025-07-18 15:17:12 +08:00
Xuewei Niu
89edba0f85 gha: Bump Rust version to 1.69.0
Keep Rust version the same as kata-containers repo 's version.

Signed-off-by: Xuewei Niu <niuxuewei.nxw@antgroup.com>
2023-07-31 15:01:17 +08:00
yaoyinnan
3dd0735324 Add UT for add_task().
Add UT for add_task() for cgroup v1 and v2.

Fixes: #103

Signed-off-by: yaoyinnan <yaoyinnan@foxmail.com>
2023-02-07 22:40:33 +08:00
Danny Canter
07878325c3 cgroup2: Add Kill method
Fixes: #98

Add a Kill method for cgroups v2. This uses the new functionality in
kernels 5.14+ where writing to a cgroup.kill file will send a SIGKILL
to every process running in the cgroup. This would be useful for
kata to avoid freezing+manually sending SIGKILL+thawing process it
does currently to emulate runc's behavior.

Signed-off-by: Danny Canter <danny@dcantah.dev>
2023-01-09 21:56:47 -08:00
yaoyinnan
c9d02afe33 cgroup: support to set threaded mode in cgroup v2
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>
2022-12-30 12:46:50 +08:00
Tim Zhang
9ec1010a15 Fix clippy warnings
Fix clippy warnings.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2021-03-03 13:44:29 +08:00
Tim Zhang
eb6577e3e0 Change package name to cgroups-rs
We need a new package name to create a new crate

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-12-21 15:46:30 +08:00
Tim Zhang
438d774866 Fix test
Fix test

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-12-17 17:56:46 +08:00
Tim Zhang
fbd7164c29 Fix warnings in tests
Remove following warnings
- unused import
- unused Result

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-12-17 17:56:46 +08:00
Tim Zhang
f34225411e Remove Box wrap of Cgroup.hire
It's unnecessary.

Signed-off-by: Tim Zhang <tim@hyper.sh>
2020-12-17 17:56:46 +08:00
bin liu
250ada183a cargo fmt
Signed-off-by: bin liu <bin@hyper.sh>
2020-09-09 16:42:55 +08:00
bin liu
ff6a0ea82a add SPDX-License-Identifier for modified files
Signed-off-by: bin liu <bin@hyper.sh>
2020-09-09 13:35:46 +08:00
bin liu
bcbf438823 Merge remote-tracking branch 'upstream/master' 2020-09-09 13:27:12 +08:00
bin liu
5d51e50bec get relative paths at new/load func default.
Signed-off-by: bin liu <bin@hyper.sh>
2020-09-08 10:30:29 +08:00
bin liu
86b245076c add SPDX-License-Identifier for all source
Add SPDX-License-Identifier for all existing codes.

Fixes: #2

Signed-off-by: bin liu <bin@hyper.sh>
2020-09-07 20:29:40 +08:00
bin liu
cd2c748a74 add systemd controller; add more tests; update blkio stat for v2
Signed-off-by: bin liu <bin@hyper.sh>
2020-09-07 14:18:41 +08:00
bin liu
c623dc3fba add basic v2 cpu/memory functions
Signed-off-by: bin liu <bin@hyper.sh>
2020-09-02 22:03:11 +08:00
bin liu
9fe6cb58e4 change *limit* in memory from u64 to i64
Signed-off-by: bin liu <bin@hyper.sh>
2020-08-27 23:06:44 +08:00
Levente Kurusa
ed1e8162d5 rust2018: remove extern crate
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
2018-12-23 16:57:41 +01:00
Hidehito Yabuuchi
2149e1c0c4 Run rustfmt 2018-10-06 18:05:59 +02:00
Levente Kurusa
af12452fca tests: cgroup: re-enable the test for moving the task
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
2018-09-09 16:46:15 +02:00
Levente Kurusa
19e2847e15 tests: fix broken tests
Fixes:  c82a94b
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
2018-09-04 10:03:56 +02:00
Levente Kurusa
7c83b7b236 test: cgroup: test moving to the root cg
Signed-off-by: Levente Kurusa <lkurusa@acm.org>
2018-09-02 15:33:57 +02:00