To reproduce:
use std::thread;
use std::time::Duration;
#[cfg(target_os = "hermit")]
use hermit as _;
fn main() {
loop {
thread::sleep(Duration::from_hours(1));
}
}
Build:
cargo build --target=x86_64-unknown-hermit -Zbuild-std=std,panic_abort --features hermit/smp,hermit/loader --package hello_world
Run without issue (no MWAIT):
qemu-system-x86_64 \
-cpu Skylake-Client \
-smp 2 \
-m 1G \
-display none \
-serial stdio \
-kernel hermit-loader-x86_64-multiboot \
-initrd target/x86_64-unknown-hermit/debug/hello_world
Run with MWAIT (use -cpu max):
qemu-system-x86_64 \
-cpu max \
-smp 2 \
-m 1G \
-display none \
-serial stdio \
-kernel hermit-loader-x86_64-multiboot \
-initrd target/x86_64-unknown-hermit/debug/hello_world
Now, two CPUs are fully utilized.
Is this expected or a bug?
To reproduce:
Build:
Run without issue (no MWAIT):
Run with MWAIT (use
-cpu max):Now, two CPUs are fully utilized.
Is this expected or a bug?