Re: [PATCH 1/2] kvm-s390: Implement the directed yield (diag 9c) hypervisor call for KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 26.04.2012, at 14:19, Christian Borntraeger wrote:

>>> +	kvm_for_each_vcpu(i, tcpu, kvm)
>>> +		if (tcpu->vcpu_id == tid) {
>> 
>> Wouldn't
>> 
>>  kvm_get_vcpu(kvm, tid)
>> 
>> be what you want here?
> 
> Would be better in terms of scalability, but we can do that
> only if kvm->vcpus[i].vcpu_id = i
> Is that always the case?

Ugh, unfortunately not. How about creating a tid -> vcpu map on init? Looping through all vcpus just to find the one with a static, linar id sounds a bit excessive to me :).


Alex

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


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux