feat: basic kratactl top command (#72)

* feat: basic kratactl top command

* fix: use magic bytes 0xff 0xff in idm to improve reliability
This commit is contained in:
Alex Zenla
2024-04-14 15:32:34 -07:00
committed by GitHub
parent 1627cbcdd7
commit 0a6a112133
11 changed files with 548 additions and 12 deletions

View File

@ -448,6 +448,10 @@ impl KrataChannelBackendProcessor {
error!("channel for domid {} has an invalid input space of {}", self.domid, space);
}
let free = XenConsoleInterface::INPUT_SIZE.wrapping_sub(space);
if free == 0 {
sleep(Duration::from_micros(100)).await;
continue;
}
let want = data.len().min(free);
let buffer = &data[index..want];
for b in buffer {