A problem about optimize the kvm_vcpu_on_spin
Hi Paolo and Radim,
Intel sdm vol3 ch-25.1.3 (p-1074) said: The “PAUSE-loop exiting” VM-execution control is ignored if CPL > 0.
Does this means that only guest's kernelspace spinlock could causes VMexit due to "pause-loop exiting" ?
If so, I think the kvm_vcpu_on_spin should selects a (currently not running)vcpu which cpl=0 to boost, because the cpl>0 vcpus are not the lock-holder. (suppose the guest isn't RT-linux)
What about your opinion ?
Signature · 2 lines
Regards, Longpeng(Mike)
Paolo Bonzini
maintainerQuoted 4 lines
Intel sdm vol3 ch-25.1.3 (p-1074) said: The “PAUSE-loop exiting” VM-execution control is ignored if CPL > 0.
Quoted 8 lines
Does this means that only guest's kernelspace spinlock could causes VMexit due to "pause-loop exiting" ?
If so, I think the
kvm_vcpu_on_spinshould selects a (currently not running) vcpu which cpl=0 to boost, because the cpl>0 vcpus are not the lock-holder. (suppose the guest isn't RT-linux)What about your opinion ?
Yes, that's a good idea!
Paolo
Quoted 11 lines · Paolo Bonzini
Quoted 11 lines
Intel sdm vol3 ch-25.1.3 (p-1074) said: The “PAUSE-loop exiting” VM-execution control is ignored if CPL > 0.
Does this means that only guest's kernelspace spinlock could causes VMexit due to "pause-loop exiting" ?
If so, I think the
kvm_vcpu_on_spinshould selects a (currently not running) vcpu which cpl=0 to boost, because the cpl>0 vcpus are not the lock-holder. (suppose the guest isn't RT-linux)
Quoted 5 lines
Quoted 1 line
What about your opinion ?
Yes, that's a good idea!
Paolo
Thanks, I will send a RFC this week.
Quoted 3 lines
.
Signature · 2 lines
Regards, Longpeng(Mike)