KVM: cpu_relax() during spin waiting for reboot
authorAvi Kivity <avi@redhat.com>
Tue, 21 Sep 2010 17:59:44 +0000 (19:59 +0200)
committerAvi Kivity <avi@redhat.com>
Sun, 24 Oct 2010 08:53:03 +0000 (10:53 +0200)
It doesn't really matter, but if we spin, we should spin in a more relaxed
manner.  This way, if something goes wrong at least it won't contribute to
global warming.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
virt/kvm/kvm_main.c

index c7a57b4feb3970179311bb6c1293a362ddf66806..b8499f544e1dcacd510001e5c3d1f89bf5ea8802 100644 (file)
@@ -2022,7 +2022,7 @@ asmlinkage void kvm_handle_fault_on_reboot(void)
                /* spin while reset goes on */
                local_irq_enable();
                while (true)
-                       ;
+                       cpu_relax();
        }
        /* Fault while not rebooting.  We want the trace. */
        BUG();