Skip to contentSkip to conversation

should vcpu_pause()/vcpu_sleep_nosync() give up?

DISCUSSION Jimi Xenidis 2 participants 4 messages Sep 6, 2006 – Sep 7, 2006

lore
Share & tools
lore
#0 lore raw

First off, I realize I have an SMP bug where my second processor is hung somewhere, I'm not sure where, but for the sake of this argument lets assume it has suffered an unrecoverable fault.

My primary CPU is fine and is hung in vcpu_sleep_nosync() because the secondary will not clear its _VCPUF_running bit. While I have this error I would like to give up and try and recover from it.
How long is long enuff?
thoughts?

-JX

#1 lore raw
Quoted 6 lines · Jimi Xenidis

First off, I realize I have an SMP bug where my second processor is hung somewhere, I'm not sure where, but for the sake of this argument lets assume it has suffered an unrecoverable fault.

My primary CPU is fine and is hung in vcpu_sleep_nosync() because the secondary will not clear its _VCPUF_running bit.

ITYM vcpu_sleep_sync(). Hint is in the name. ;-) The nosync variant does not spin on the _running flag.

Quoted 4 lines

While I have this error I would like to give up and try and recover from it.
How long is long enuff?
thoughts?

Holy crap!

Are you assuming that the offline CPU was not running anything other than the idle loop or guest code, and that you'll simply destroy the guest if one was running (since you can't really continue it)? Given that this is a software bug, these assumptions are likely not true and the CPU has gone down taking some locks with it. However, being optimistic, I suppose a few 100ms would be plenty to know that something is probably up.

-- Keir

#2 lore raw
Quoted 11 lines · Keir Fraser
Quoted 6 lines · Jimi Xenidis

First off, I realize I have an SMP bug where my second processor is hung somewhere, I'm not sure where, but for the sake of this argument lets assume it has suffered an unrecoverable fault.

My primary CPU is fine and is hung in vcpu_sleep_nosync() because the secondary will not clear its _VCPUF_running bit.

ITYM vcpu_sleep_sync(). Hint is in the name. ;-) The nosync variant does not spin on the _running flag.

Correct.

Quoted 7 lines
Quoted 5 lines

While I have this error I would like to give up and try and recover from it.
How long is long enuff?
thoughts?

Holy crap!

I find these things to be rather UN-holy :)

Quoted 4 lines

Are you assuming that the offline CPU was not running anything other than the idle loop or guest code, and that you'll simply destroy the guest if one was running (since you can't really continue it)?

Not sure how far I'd go here, but right now, I'd be happy with one CPU not causing all CPUs (or the one servicing a xend command) to sit in an infinite loop, even if its my fault.

Quoted 2 lines

Given that this is a
software bug,

and there is always at least one :)

Quoted 2 lines

these assumptions are likely not true and the CPU has gone down taking some locks with it.

Hypervisors should increase the availability of the machine as a whole, PPC machines tend to have many HA features that when unhandled (mostly ECC) can cause a CPU to go down.

Quoted 2 lines

However, being optimistic, I suppose a few
100ms would be plenty to know that something is probably up.

ok.. I'll work with that, thanks
-JX

#3 lore raw
Quoted 6 lines · Jimi Xenidis
Quoted 2 lines

these assumptions are likely not true and the CPU has gone down taking some locks with it.

Hypervisors should increase the availability of the machine as a whole, PPC machines tend to have many HA features that when unhandled (mostly ECC) can cause a CPU to go down.

Unhandled errors should make the *machine* fail-stop, not just one CPU. High availability is important, but getting the correct answer from your computations tends to rank higher. If hardware detects an unrecoverable error that cannot be handled sanely in software either, I think most people would agree it's time for a reboot.

-- Keir