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
5aa7e6c90e
Fix clippy for rust 1.52
...
There are new lints are added in clippy for rust 1.52
Signed-off-by: Tim Zhang <tim@hyper.sh >
2021-05-21 00:45:27 +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
42ee1bafbd
Make Cgroup can be stored in struct
...
- Change type of hier to remove lifetimes
- impl Clone, Default, Debug for Cgroup
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
Tim Zhang
567cdb43b3
Use Option as resource fields, remove the update switch: update_values
...
Use idiomatic Option::None to represent optional fields.
This enables updates where not all fields need to be specified.
Signed-off-by: Tim Zhang <tim@hyper.sh >
2020-12-17 17:56:41 +08:00
bin liu
152af17f8f
fix build warnings
...
And in Travis CI, treat warnings as error
to keep from merging codes with warning.
Fixes : #13
Signed-off-by: bin liu <bin@hyper.sh >
2020-09-23 16:19:51 +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
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
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
01a3c22829
Transition to Rust 2018
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-12-23 16:31:05 +01:00
Levente Kurusa
3b9d4a8c2a
builder: document blkio
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-10-30 21:47:21 +01:00
Levente Kurusa
e51d781baf
builder: add some documentation
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-10-30 21:47:21 +01:00
Levente Kurusa
b4cc91f977
Builder pattern for control groups
...
Signed-off-by: Levente Kurusa <lkurusa@acm.org >
2018-10-30 21:47:18 +01:00