On Mon, Feb 08, 2016 at 11:40:14AM +0000, Marc Zyngier wrote: > I've recently been looking at our entry/exit costs, and profiling > figures did show some very low hanging fruits. > > The most obvious cost is that accessing the GIC HW is slow. As in > "deadly slow", specially when GICv2 is involved. So not hammering the > HW when there is nothing to write is immediately beneficial, as this > is the most common cases (whatever people seem to think, interrupts > are a *rare* event). > > Another easy thing to fix is the way we handle trapped system > registers. We do insist on (mostly) sorting them, but we do perform a > linear search on trap. We can switch to a binary search for free, and > get immediate benefits (the PMU code, being extremely trap-happy, > benefits immediately from this). > > With these in place, I see an improvement of 20 to 30% (depending on > the platform) on our world-switch cycle count when running a set of > hand-crafted guests that are designed to only perform traps. > By the way, I took this whole stack of changes (wsinc, vhe, and optimizations) and ran it on Mustang and fired up UEFI and did a reboot and things seem to work, so that's a small shallow 'tested-by-something-else-than-a-linux-guest' statement from me. -Christoffer -- 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