From: Jan Kiszka <[email protected]> It has been observed and also confirmed by Intel that hlt can cause wake-up delay in the order of microseconds, although no particular power management is requested this way. That's obviously because of unpredictable decisions of the CPU how to react on that internally.
As the apic-demo is (also) about demonstrating the minimal possible interrupt delay, switch to polling. Signed-off-by: Jan Kiszka <[email protected]> --- inmates/demos/x86/apic-demo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inmates/demos/x86/apic-demo.c b/inmates/demos/x86/apic-demo.c index 2f3a6070..5b88f2e0 100644 --- a/inmates/demos/x86/apic-demo.c +++ b/inmates/demos/x86/apic-demo.c @@ -131,7 +131,7 @@ void inmate_main(void) init_apic(); while (!terminate) { - asm volatile("hlt"); + cpu_relax(); if (cache_pollution) pollute_cache(mem); -- 2.16.4 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
