We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eab22b4 commit 694d1c5Copy full SHA for 694d1c5
lading/src/observer/linux/cgroup/v2/cpu.rs
@@ -52,8 +52,8 @@ impl Sampler {
52
let (max_str, period_str) = (parts[0], parts[1]);
53
let allowed_cores = if max_str == "max" {
54
// If the target cgroup has no CPU limit we assume it has access to all
55
- // physical cores.
56
- num_cpus::get_physical() as f64
+ // logical cores, inclusive of hyperthreaded cores.
+ num_cpus::get() as f64
57
} else {
58
let max_val = max_str.parse::<f64>()?;
59
let period_val = period_str.parse::<f64>()?;
0 commit comments