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 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.

Thanks,
	Takuya
--
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