Re: [RFC PATCH] KVM: x86: Skip request checking branches in vcpu_enter_guest() more effectively

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

 



On 09/24/2012 04:32 PM, Takuya Yoshikawa wrote:
> On Mon, 24 Sep 2012 12:09:00 +0200
> Avi Kivity <avi@xxxxxxxxxx> wrote:
> 
>> > while (vcpu->request) {
>> > 	xchg(vcpu->request, request);
>> > 
>> > 	for_each_set_bit(request) {
>> > 		clear_bit(X);
>> > 
>> > 		......
>> > 	}
>> > 	
>> > }
>> 
>> In fact I had something like that in one of the earlier versions, but it
>> was problematic.  I'll try to see what the issue was.
> 
> Unless there are many requests, the cost of for_each_set_bit() and a few
> added code may exceed that of the original code.
> (Looping using __ffs() is an alternative because requests is "long".)
> 
> So I wanted to know the most common requests pattern.

See other branch of this thread.  But in short, I now think you are
right and the special-case is warranted.

(not for STEAL_UPDATE - that's likely a bug, it should only happen on
overcommit)


-- 
error compiling committee.c: too many arguments to function
--
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