Am 26.11.2014 um 10:23 schrieb David Hildenbrand:
>> This change is a trade-off.
>> PRO: This patch would improve the case of preemption on s390. This is 
>> probably a corner case as most distros have preemption off anyway.
>> CON: The downside is that kvm_vcpu_yield_to is called also from 
>> kvm_vcpu_on_spin. Here we want to avoid the scheduler overhead for a wrong 
>> decision.   
> 
> Won't most of that part be covered by:
>       if (!ACCESS_ONCE(vcpu->preempted))

Hmm, right. Checking vcpu->preempted and PF_VCPU might boil down to the same.
Would be good if to have to performance regression test, though. 

> 
> vcpu->preempted is only set when scheduled out involuntarily. It is cleared
> when scheduled in. s390 sets it manually, to speed up waking up a vcpu.
> 
> So when our task is scheduled in (an PF_VCPU is set), this check will already
> avoid scheduler overhead in kvm_vcpu_on_spin() or am I missing something?
> 

CC Raghavendra KT. Could be rerun your kernbench/sysbench/ebizzy setup on x86 
to see if the patch in this thread causes any regression? If think your commit 
7bc7ae25b143"kvm: Iterate over only vcpus that are preempted" might have really 
made the PF_VCPU check unnecessary

CC Michael Mueller, do we still have our yield performance setup handy to check 
if this patch causes any regression?


Christian

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to