KVM/s390: Set preempted flag during vcpu wakeup and interrupt delivery
authorMichael Mueller <mimu@linux.vnet.ibm.com>
Wed, 26 Feb 2014 15:14:19 +0000 (16:14 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 26 Feb 2014 16:32:12 +0000 (17:32 +0100)
commit9cac38dd5dc41c943d711b96f9755a29c8b854ea
tree31aa15f442745714842aff4aba4049096af3b2d4
parent98f4a14676127397c54cab7d6119537ed4d113a2
KVM/s390: Set preempted flag during vcpu wakeup and interrupt delivery

Commit "kvm: Record the preemption status of vcpus using preempt notifiers"
caused a performance regression on s390. It turned out that in the case that
if a former sleeping cpu, that was woken up, this cpu is not a yield candidate
since it gave up the cpu voluntarily. To retain this candiate its preempted
flag is set during wakeup and interrupt delivery time.

Significant performance measurement work and code analysis to solve this
issue was provided by Mao Chuan Li and his team in Beijing.

Signed-off-by: Michael Mueller <mimu@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/s390/kvm/interrupt.c