-
Notifications
You must be signed in to change notification settings - Fork 346
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
Add support to Intel RDT. #1822
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1822 +/- ##
==========================================
+ Coverage 68.63% 68.64% +0.01%
==========================================
Files 121 122 +1
Lines 13327 13606 +279
==========================================
+ Hits 9147 9340 +193
- Misses 4180 4266 +86 |
@ipuustin Thanks for your PR. Since I need some time to learn Interl RDT, I'll check this next weekend. |
8ea32da
to
50a9ccd
Compare
Note that this PR is needed to oci-spec-rs in order for the |
crates/libcontainer/Cargo.toml
Outdated
@@ -42,6 +42,8 @@ serde_json = "1.0" | |||
syscalls = "0.6.9" | |||
rust-criu = "0.4.0" | |||
clone3 = "0.2.3" | |||
regex = "1.7.3" | |||
lazy_static = "1.4.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are using once_cell
, please use it instead of lazy_static
🙏
@@ -69,6 +72,7 @@ pub fn container_main_process(container_args: &ContainerArgs) -> Result<Pid> { | |||
// The intermediate process will send the init pid once it forks the init | |||
// process. The intermediate process should exit after this point. | |||
let init_pid = main_receiver.wait_for_intermediate_ready()?; | |||
let mut need_to_clean_up_intel_rdt_subdirectory: bool = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits
let mut need_to_clean_up_intel_rdt_subdirectory: bool = false; | |
let mut need_to_clean_up_intel_rdt_subdirectory = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait for updating oci-spec-rs
@utam0k Thanks for reviewing! I implemented the suggested changes. |
@ipuustin Thanks 😍 May I ask you to give me the instructions to confirm the behavior you have implemented? |
The documentation of the kernel resctrl interface (which this PR uses) is here: https://docs.kernel.org/x86/resctrl.html Briefly, you mount the resctrl filesystem ( Which changes can you do to the schemata files depend on the computer system you have in use. A good approximation would be to see what the kernel has prepopulated to the schemata files and try to modify those values. The OCI config spec has this example for the config.json file:
|
Signed-off-by: Ismo Puustinen <[email protected]>
Note: this requires resctrl filesystem to be mounted. Signed-off-by: Ismo Puustinen <[email protected]>
Rebased to fix conflict in Cargo.lock. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Add support to Intel RDT.
Fixes: #443.
This PR implements also the suggested additions to OCI runtime spec here: opencontainers/runtime-spec#1196