feat: basic kratactl top command

This commit is contained in:
Alex Zenla
2024-04-14 11:48:20 +00:00
parent 1627cbcdd7
commit 66574235c2
9 changed files with 522 additions and 3 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 {