Re: exit timing analysis v1 - comments&discussions welcome

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

 




Hollis Blanchard wrote:
Also, it looks like we use the generic find_first_bit(). That may be
more expensive than we'd like. However, since
vcpu->arch.pending_exceptions is a single long (not an arbitrary sized
bitfield), we should be able to use ffs() instead, which has an
optimized PowerPC implementation. That might help a lot.

We might even be able to replace find_next_bit() too, by shifting a mask
over each loop, but I don't think we'll have to, since I expect the
common case to be we can deliver the first pending exception. (Worth
checking? :)
FFS for first one is working fine.
To check if modifying the following Find next bit to mask&__ffs I did some quick accounting and it seems not to be worth.

On the exits casued by external interrupts we hit "find next bit" in ~50% of the cases (MMIO, DCR, DEC, EXITINT). But on all the frequent cases like DTLVVIRT, ITLBVIRT and EMULINST we are at ~2.75%.
Therefore it should be ok to keep the generic find_next_bit there.

--

Grüsse / regards, Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization

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

[Index of Archives]     [KVM Development]     [KVM ARM]     [KVM ia64]     [Linux Virtualization]     [Linux USB Devel]     [Linux Video]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux