12806 Serial console polling burns CPU on VMware

Review Request #2568 — Created May 29, 2020 and updated

gwr
illumos-gate
12806
general

12806 Serial console polling burns CPU on VMware

Setup illumos guest under VMware with serial console
Notes here: https://github.com/jclulow/vmware-sercons
Booted with the change
press Esc to stop at loader prompt
observe laptop fan quiet

Boot the kernel with -kd
while stopped at kmdb prompt
observe laptop fan quiet

During later operation, break into kmdb (telnet send brk, or mdb -K)
observe laptop fan quiet

I did not observe any other behavior changes with this code.

  • 0
  • 0
  • 5
  • 0
  • 5
Description From Last Updated
gwr
tsoome
  1. Ship It!
  2. 
      
jlevon
  1. This clears the MSR delta bits. Did you confirm this doesn't break any expectations of the rest of the code? I think probably not due to no interrupts but...

    Looks like this is entirely VMWare-specific; neither qemu/kvm nor bhyve implement this.

    Why didn't you fix post-boot kmdb too (i.e. the asy via polledio interface)

    1. re vmware: could you update the bug title to reflect what's getting fixed (vmware only)

    2. OK. Can you point me to the "post-boot kmdb" code I missed?

  2. usr/src/uts/common/io/asy.c (Diff revision 1)
     
     

    typo: "pollng"

  3. usr/src/uts/i86pc/boot/boot_console.c (Diff revision 1)
     
     

    typo: "pollng"

  4. 
      
yuripv
  1. 
      
  2. s/do to/to do/

  3. usr/src/uts/common/io/asy.c (Diff revision 1)
     
     

    s/do to/to do/

  4. usr/src/uts/i86pc/boot/boot_console.c (Diff revision 1)
     
     

    s/do to/to do/

  5. 
      
gwr
gwr
jlevon
  1. Since it seems your email address configured bounces:

    OK. Can you point me to the "post-boot kmdb" code I missed?

    Looks like you found it. Presumably you've tested KMDB after boot as
    well.

    I don't think you replied to my question about the MSR read
    side-effects. I haven't really tried to untangle the handling of the
    delta bits there, but presumably you have?

    1. Yes, kmdb after boot worked the same.

      As for possible side effects: All these polling loops appear to run only where interrupts are disabled.
      I did not observe any other side effects from the change. I welcome suggestions for additional testing.

  2. 
      
gwr
Review request changed

Testing Done:

   

Setup illumos guest under VMware with serial console

    Notes here: https://github.com/jclulow/vmware-sercons
    Booted with the change
    press Esc to stop at loader prompt
    observe laptop fan quiet

   
   

Boot the kernel with -kd

    while stopped at kmdb prompt
    observe laptop fan quiet

   
  +

During later operation, break into kmdb (telnet send brk, or mdb -K)

  + observe laptop fan quiet

  +
   

I did not observe any other behavior changes with this code.

Loading...