Skip to content

Commit bab1d92

Browse files
committed
revert cpu share change
1 parent 03919c3 commit bab1d92

1 file changed

Lines changed: 1 addition & 11 deletions

File tree

  • src/libs/kata-types/src/annotations

src/libs/kata-types/src/annotations/mod.rs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ use crate::config::TomlConfig;
1717
use crate::initdata::add_hypervisor_initdata_overrides;
1818
use crate::sl;
1919

20-
use self::cri_containerd::{
21-
SANDBOX_CPU_PERIOD_KEY, SANDBOX_CPU_QUOTA_KEY, SANDBOX_CPU_SHARE_KEY, SANDBOX_MEM_KEY,
22-
};
20+
use self::cri_containerd::{SANDBOX_CPU_PERIOD_KEY, SANDBOX_CPU_QUOTA_KEY, SANDBOX_MEM_KEY};
2321

2422
/// CRI-containerd specific annotations.
2523
pub mod cri_containerd;
@@ -445,14 +443,6 @@ impl Annotation {
445443
value.unwrap_or(0)
446444
}
447445

448-
/// Get the annotation of cpu shares for sandbox
449-
pub fn get_sandbox_cpu_shares(&self) -> u64 {
450-
let value = self
451-
.get_value::<u64>(SANDBOX_CPU_SHARE_KEY)
452-
.unwrap_or(Some(0));
453-
value.unwrap_or(0)
454-
}
455-
456446
/// Get the annotation of memory for sandbox
457447
pub fn get_sandbox_mem(&self) -> i64 {
458448
let value = self.get_value::<i64>(SANDBOX_MEM_KEY).unwrap_or(Some(0));

0 commit comments

Comments
 (0)