Skip to content

Commit

Permalink
Merge pull request #75 from Wabct/main
Browse files Browse the repository at this point in the history
  • Loading branch information
Burning1020 authored Sep 4, 2023
2 parents 5652258 + 5b2ed13 commit eb10f91
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vmm/sandbox/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,11 @@ fn merge_resources(

LinuxContainerResources {
cpu_period: resource1.cpu_period,
cpu_quota: resource1.cpu_quota
+ resource2.cpu_quota * resource1.cpu_period / resource2.cpu_period,
cpu_quota: if resource2.cpu_period != 0 {
resource1.cpu_quota + resource2.cpu_quota * resource1.cpu_period / resource2.cpu_period
} else {
resource1.cpu_quota
},
cpu_shares: resource1.cpu_shares + resource2.cpu_shares,
memory_limit_in_bytes: resource1.memory_limit_in_bytes + resource2.memory_limit_in_bytes,
oom_score_adj,
Expand Down

0 comments on commit eb10f91

Please sign in to comment.