Re: [PATCH] KVM: x86: lapic: Fix the misuse of likely() in find_highest_vector()

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

 



On Fri, Aug 24, 2012 at 06:15:49PM +0900, Takuya Yoshikawa wrote:
> Although returning -1 should be likely according to the likely(),
> the ASSERT in apic_find_highest_irr() will be triggered in such a case.
> It seems that this optimization is not working as expected.
> 
> This patch simplifies the logic to mitigate this issue: search for the
> first non-zero word in a for loop and then use __fls() if found.  When
> nothing found, we are out of the loop, so we can just return -1.

Numbers please?

> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@xxxxxxxxxxxxx>
> ---
>  arch/x86/kvm/lapic.c |   18 ++++++++++--------
>  1 files changed, 10 insertions(+), 8 deletions(-)

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