Skip to content

Commit bbdfa88

Browse files
authored
Merge pull request #26 from Tim-Zhang/memory-apply-customized-attrs
Apply customized attributes in MemController.apply
2 parents 87f8ac7 + 853ed46 commit bbdfa88

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ repository = "https://github.com/kata-containers/cgroups-rs"
55
keywords = ["linux", "cgroup", "containers", "isolation"]
66
categories = ["os", "api-bindings", "os::unix-apis"]
77
license = "MIT OR Apache-2.0"
8-
version = "0.2.1"
8+
version = "0.2.2"
99
authors = ["The Kata Containers community <[email protected]>", "Levente Kurusa <[email protected]>", "Sam Wilson <[email protected]>"]
1010
edition = "2018"
1111

src/memory.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ impl ControllerInternal for MemController {
460460
update!(self, set_tcp_limit, memres.kernel_tcp_memory_limit);
461461
update!(self, set_swappiness, memres.swappiness);
462462

463+
memres.attrs.iter().for_each(|(k, v)| {
464+
let _ = self.set(k, v);
465+
});
466+
463467
Ok(())
464468
}
465469
}

0 commit comments

Comments
 (0)