Merge pull request #434 from hodgesds/cpu-topo-cache-id

scx_utils: Add LLC id to CPU
This commit is contained in:
Tejun Heo 2024-07-16 06:20:17 -10:00 committed by GitHub
commit 47ee332196
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -83,6 +83,7 @@ pub struct Cpu {
min_freq: usize,
max_freq: usize,
trans_lat_ns: usize,
llc_id: usize,
}
impl Cpu {
@ -105,6 +106,11 @@ impl Cpu {
pub fn trans_lat_ns(&self) -> usize {
self.trans_lat_ns
}
/// Get the LLC id of the this Cpu
pub fn llc_id(&self) -> usize {
self.llc_id
}
}
#[derive(Debug, Clone)]
@ -414,6 +420,7 @@ fn create_insert_cpu(cpu_id: usize, node: &mut Node, online_mask: &Cpumask) -> R
min_freq: min_freq,
max_freq: max_freq,
trans_lat_ns: trans_lat_ns,
llc_id: llc_id,
},
);