mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 21:00:55 +00:00
fix(power): ensure that xeon cpus with cpu gaps are not detected as p/e compatible
This commit is contained in:
parent
a79320b4fc
commit
e6d9b2e3c7
@ -9,7 +9,7 @@ use krata::{
|
|||||||
idm::{internal::event::Event as EventType, internal::Event},
|
idm::{internal::event::Event as EventType, internal::Event},
|
||||||
v1::common::{GuestExitInfo, GuestState, GuestStatus},
|
v1::common::{GuestExitInfo, GuestState, GuestStatus},
|
||||||
};
|
};
|
||||||
use log::{error, info, warn};
|
use log::{error, warn};
|
||||||
use tokio::{
|
use tokio::{
|
||||||
select,
|
select,
|
||||||
sync::{
|
sync::{
|
||||||
@ -90,7 +90,6 @@ impl DaemonEventGenerator {
|
|||||||
let status = state.status();
|
let status = state.status();
|
||||||
let id = Uuid::from_str(&guest.id)?;
|
let id = Uuid::from_str(&guest.id)?;
|
||||||
let domid = state.domid;
|
let domid = state.domid;
|
||||||
info!("Guest {} on Zone {} changed - {:?}", id, domid, status);
|
|
||||||
match status {
|
match status {
|
||||||
GuestStatus::Started => {
|
GuestStatus::Started => {
|
||||||
if let Entry::Vacant(e) = self.idms.entry(domid) {
|
if let Entry::Vacant(e) = self.idms.entry(domid) {
|
||||||
|
@ -47,7 +47,12 @@ fn labelled_topo(input: &[SysctlCputopo]) -> Vec<CpuTopologyInfo> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if last
|
if last
|
||||||
.map(|last| (item.core - last.core) >= 2)
|
.map(|last| {
|
||||||
|
item.core
|
||||||
|
.checked_sub(last.core)
|
||||||
|
.map(|diff| diff >= 3)
|
||||||
|
.unwrap_or(false)
|
||||||
|
})
|
||||||
.unwrap_or(false)
|
.unwrap_or(false)
|
||||||
{
|
{
|
||||||
// detect if performance cores seem to be kicking in.
|
// detect if performance cores seem to be kicking in.
|
||||||
|
Loading…
Reference in New Issue
Block a user