Skip to contentSkip to conversation

"CPU N still not dead..." messages during microcode update stage of boot when smt=0

Xen-devel Andy Smith 4 participants 8 messages Jul 21, 2019 – Aug 2, 2019

lore
Share & tools
lore

Andy Smith

author
#0 lore raw

Hi,

My first time using smt=0 on hypervisor command line so not sure how many versions and different pieces of hardware this happens with, but I noticed this during the microcode update stage of boot:

(XEN) HVM: HAP page sizes: 4kB, 2MB, 1GB
(XEN) Adding cpu 1 to runqueue 0
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) Removing cpu 1 from runqueue 0
(XEN) microcode: CPU2 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 2 to runqueue 0
(XEN) Adding cpu 3 to runqueue 0
(XEN) Removing cpu 3 from runqueue 0
(XEN) microcode: CPU4 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 4 to runqueue 0
(XEN) Adding cpu 5 to runqueue 0
(XEN) Removing cpu 5 from runqueue 0
(XEN) microcode: CPU6 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 6 to runqueue 0
(XEN) Adding cpu 7 to runqueue 0
(XEN) Removing cpu 7 from runqueue 0
(XEN) microcode: CPU8 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 8 to runqueue 0
(XEN) Adding cpu 9 to runqueue 0
(XEN) Removing cpu 9 from runqueue 0
(XEN) microcode: CPU10 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 10 to runqueue 0
(XEN) Adding cpu 11 to runqueue 0
(XEN) Removing cpu 11 from runqueue 0
(XEN) microcode: CPU12 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 12 to runqueue 0
(XEN) Adding cpu 13 to runqueue 0
(XEN) Removing cpu 13 from runqueue 0
(XEN) microcode: CPU14 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 14 to runqueue 0
(XEN) Adding cpu 15 to runqueue 0
(XEN) Removing cpu 15 from runqueue 0
(XEN) Brought up 8 CPUs
(XEN) Parked 8 CPUs

It doesn't happen with smt=1 and it also doesn't happen when SMT is disabled in the BIOS.

Boot does continue normally after this point.

Is this expected? 4.12.

Cheers,
Andy

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#1 lore raw
Quoted 65 lines · Andy Smith

Hi,

My first time using smt=0 on hypervisor command line so not sure how many versions and different pieces of hardware this happens with, but I noticed this during the microcode update stage of boot:

(XEN) HVM: HAP page sizes: 4kB, 2MB, 1GB
(XEN) Adding cpu 1 to runqueue 0
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) Removing cpu 1 from runqueue 0
(XEN) microcode: CPU2 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 2 to runqueue 0
(XEN) Adding cpu 3 to runqueue 0
(XEN) Removing cpu 3 from runqueue 0
(XEN) microcode: CPU4 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 4 to runqueue 0
(XEN) Adding cpu 5 to runqueue 0
(XEN) Removing cpu 5 from runqueue 0
(XEN) microcode: CPU6 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 6 to runqueue 0
(XEN) Adding cpu 7 to runqueue 0
(XEN) Removing cpu 7 from runqueue 0
(XEN) microcode: CPU8 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 8 to runqueue 0
(XEN) Adding cpu 9 to runqueue 0
(XEN) Removing cpu 9 from runqueue 0
(XEN) microcode: CPU10 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 10 to runqueue 0
(XEN) Adding cpu 11 to runqueue 0
(XEN) Removing cpu 11 from runqueue 0
(XEN) microcode: CPU12 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 12 to runqueue 0
(XEN) Adding cpu 13 to runqueue 0
(XEN) Removing cpu 13 from runqueue 0
(XEN) microcode: CPU14 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 14 to runqueue 0
(XEN) Adding cpu 15 to runqueue 0
(XEN) Removing cpu 15 from runqueue 0
(XEN) Brought up 8 CPUs
(XEN) Parked 8 CPUs

Quoted 6 lines

It doesn't happen with smt=1 and it also doesn't happen when SMT is disabled in the BIOS.

Boot does continue normally after this point.

Is this expected? 4.12.

"Expected" isn't the right word. I've noticed this too on one or two occasions, and I can't (yet) explain what's going on there, the more that so far (including your report) this is only ever for the first CPU to get re-offlined. Something to be looked into as time permits.

Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 69 lines · Jan Beulich
Quoted 68 lines · Andy Smith

Hi,

My first time using smt=0 on hypervisor command line so not sure how many versions and different pieces of hardware this happens with, but I noticed this during the microcode update stage of boot:

(XEN) HVM: HAP page sizes: 4kB, 2MB, 1GB
(XEN) Adding cpu 1 to runqueue 0
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) CPU 1 still not dead...
(XEN) Removing cpu 1 from runqueue 0
(XEN) microcode: CPU2 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 2 to runqueue 0
(XEN) Adding cpu 3 to runqueue 0
(XEN) Removing cpu 3 from runqueue 0
(XEN) microcode: CPU4 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 4 to runqueue 0
(XEN) Adding cpu 5 to runqueue 0
(XEN) Removing cpu 5 from runqueue 0
(XEN) microcode: CPU6 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 6 to runqueue 0
(XEN) Adding cpu 7 to runqueue 0
(XEN) Removing cpu 7 from runqueue 0
(XEN) microcode: CPU8 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 8 to runqueue 0
(XEN) Adding cpu 9 to runqueue 0
(XEN) Removing cpu 9 from runqueue 0
(XEN) microcode: CPU10 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 10 to runqueue 0
(XEN) Adding cpu 11 to runqueue 0
(XEN) Removing cpu 11 from runqueue 0
(XEN) microcode: CPU12 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 12 to runqueue 0
(XEN) Adding cpu 13 to runqueue 0
(XEN) Removing cpu 13 from runqueue 0
(XEN) microcode: CPU14 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Adding cpu 14 to runqueue 0
(XEN) Adding cpu 15 to runqueue 0
(XEN) Removing cpu 15 from runqueue 0
(XEN) Brought up 8 CPUs
(XEN) Parked 8 CPUs

It doesn't happen with smt=1 and it also doesn't happen when SMT is disabled in the BIOS.

Quoted 7 lines
Quoted 3 lines

Boot does continue normally after this point.

Is this expected? 4.12.

"Expected" isn't the right word. I've noticed this too on one or two occasions, and I can't (yet) explain what's going on there, the more that so far (including your report) this is only ever for the first CPU to get re-offlined. Something to be looked into as time permits.

Does reverting back to credit1 make the issue go away?  I've never encountered this on any smt=0 test, but I also don't use credit2 at all.

The sibling threads shouldn't be inserted into the scheduler in the first place, and I thought we took deliberate steps to prevent that from occurring.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 2 lines · Andrew Cooper

Does reverting back to credit1 make the issue go away?  I've never encountered this on any smt=0 test, but I also don't use credit2 at all.

I'll try to remember trying this out the next time I see it. I can't see a connection to the used scheduler though, when the message comes out of __cpu_die(). There must be an excessive delay for the dying CPU to finally call cpu_exit_clear(). I wonder if the CPU might e.g. be scrubbing memory at that point. But that shouldn't happen this early.

Quoted 3 lines

The sibling threads shouldn't be inserted into the scheduler in the first place, and I thought we took deliberate steps to prevent that from occurring.

I don't think we did, but I agree this may be worthwhile to do if it wouldn't result in adding ugly special cases somewhere.

Jan
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 11 lines · Jan Beulich
Quoted 2 lines · Andrew Cooper

Does reverting back to credit1 make the issue go away?  I've never encountered this on any smt=0 test, but I also don't use credit2 at all.

I'll try to remember trying this out the next time I see it. I can't see a connection to the used scheduler though, when the message comes out of __cpu_die(). There must be an excessive delay for the dying CPU to finally call cpu_exit_clear(). I wonder if the CPU might e.g. be scrubbing memory at that point. But that shouldn't happen this early.

Quoted 6 lines
Quoted 3 lines

The sibling threads shouldn't be inserted into the scheduler in the first place, and I thought we took deliberate steps to prevent that from occurring.

I don't think we did, but I agree this may be worthwhile to do if it wouldn't result in adding ugly special cases somewhere.

Hmm, I wonder if my patch "xen/sched: populate cpupool0 only after all cpus are up" from my core scheduling series might help?

I already thought of moving it rather to the beginning of the series as it could go in even without the core scheduling.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

author
#5 lore raw
In reply to Andrew Cooper

Hi,

Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Andy Smith

(XEN) Adding cpu 1 to runqueue 0 (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead...

[…]

Quoted 1 line

Does reverting back to credit1 make the issue go away?

Yes, I don't see this with sched=credit, smt=0 and SMT enabled in the BIOS:

(XEN) microcode: CPU2 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU4 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU6 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU8 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU10 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU12 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU14 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Brought up 8 CPUs
(XEN) Parked 8 CPUs

Thanks,
Andy

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#6 lore raw
Quoted 18 lines · Andy Smith

Hi,

Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Andy Smith

(XEN) Adding cpu 1 to runqueue 0 (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead...

[…]

Quoted 1 line

Does reverting back to credit1 make the issue go away?

Yes, I don't see this with sched=credit, smt=0 and SMT enabled in the BIOS:

Quoted 9 lines

(XEN) microcode: CPU2 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU4 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU6 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU8 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU10 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU12 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) microcode: CPU14 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02 (XEN) Brought up 8 CPUs
(XEN) Parked 8 CPUs

This will be cured by my core scheduling series. As I don't think we want to wait for that to go in I can isolate the related patches and post them.

The needed patches will be:

xen/sched: use one schedule lock for all free cpus xen/sched: populate cpupool0 only after all cpus are up xen/sched: remove cpu from pool0 before removing it xen/sched: add minimalistic idle scheduler for free cpus

With those in place credit2 will never be in charge for a cpu just being brought up, which in turn can't block a cpu to be parked right away.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#7 lore raw
Quoted 36 lines · Juergen Gross
Quoted 18 lines · Andy Smith

Hi,

Quoted 7 lines · Andrew Cooper
Quoted 6 lines · Jan Beulich
Quoted 5 lines · Andy Smith

(XEN) Adding cpu 1 to runqueue 0 (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead... (XEN) CPU 1 still not dead...

[…]

Quoted 1 line

Does reverting back to credit1 make the issue go away?

Yes, I don't see this with sched=credit, smt=0 and SMT enabled in the BIOS:

Quoted 16 lines

(XEN) microcode: CPU2 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02
(XEN) microcode: CPU4 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02
(XEN) microcode: CPU6 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02
(XEN) microcode: CPU8 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02
(XEN) microcode: CPU10 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02
(XEN) microcode: CPU12 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02
(XEN) microcode: CPU14 updated from revision 0x2000057 to 0x200005e, date = 2019-04-02
(XEN) Brought up 8 CPUs
(XEN) Parked 8 CPUs

Quoted 3 lines

This will be cured by my core scheduling series. As I don't think we want to wait for that to go in I can isolate the related patches and post them.

Please do.  The fix for this really wants to go back to all staging trees.

~Andrew

P.S. isn't it lovely when reported bugs are already fixed.  I could get used to this...

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel