From: Michael S. Tsirkin Date: Sun, 24 Jun 2012 16:24:26 +0000 (+0300) Subject: KVM: optimize ISR lookups X-Git-Tag: v3.6-rc1~124^2~61 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8680b94b0e6046af2644c17313287ec0cb5843dc;p=pandora-kernel.git KVM: optimize ISR lookups We perform ISR lookups twice: during interrupt injection and on EOI. Typical workloads only have a single bit set there. So we can avoid ISR scans by 1. counting bits as we set/clear them in ISR 2. on set, caching the injected vector number 3. on clear, invalidating the cache The real purpose of this is enabling PV EOI which needs to quickly validate the vector. But non PV guests also benefit: with this patch, and without interrupt nesting, apic_find_highest_isr will always return immediately without scanning ISR. Signed-off-by: Michael S. Tsirkin Signed-off-by: Avi Kivity --- Reading git-diff-tree failed