Currently, any time a request bit is set (not too uncommon) we check all of them. This patchset optimizes the process slightly by skipping over unset bits using for_each_set_bit(). v3: new approach using for_each_set_bit(), as the previous one might have skipped a bit. Avi Kivity (6): KVM: Don't use KVM_REQ_PENDING_TIMER KVM: Simplify KVM_REQ_EVENT/req_int_win handling KVM: Move mmu reload out of line KVM: Optimize vcpu->requests checking KVM: Reorder KVM_REQ_EVENT to optimize processing KVM: Clean up vcpu->requests == 0 processing arch/x86/kvm/mmu.c | 4 +- arch/x86/kvm/svm.c | 1 + arch/x86/kvm/timer.c | 8 +-- arch/x86/kvm/x86.c | 142 ++++++++++++++++++++++++++--------------------- include/linux/kvm_host.h | 14 ++--- 5 files changed, 91 insertions(+), 78 deletions(-) -- 1.7.11 -- 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