Skip to contentSkip to conversation

A problem about optimize the kvm_vcpu_on_spin

DISCUSSION Longpeng (Mike) 2 participants 3 messages Nov 14, 2016 KVM

lore
Share & tools
lore
#0 lore raw

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)
maintainer
#1 lore raw
Quoted 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_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 ?

Yes, that's a good idea!

Paolo

#2 lore raw
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_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)

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)