Re: [PATCH -v4] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-12 Thread Marcelo Tosatti
On Wed, Sep 05, 2012 at 07:30:01PM +0900, Takuya Yoshikawa wrote: > find_highest_vector() and count_vectors(): > - Instead of using magic values, define and use proper macros. > > find_highest_vector(): > - Remove likely() which is there only for historical reasons and not >doing correct bra

Re: [PATCH -v4] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Michael S. Tsirkin
On Wed, Sep 05, 2012 at 07:30:01PM +0900, Takuya Yoshikawa wrote: > find_highest_vector() and count_vectors(): > - Instead of using magic values, define and use proper macros. > > find_highest_vector(): > - Remove likely() which is there only for historical reasons and not >doing correct bra

[PATCH -v4] KVM: x86: lapic: Clean up find_highest_vector() and count_vectors()

2012-09-05 Thread Takuya Yoshikawa
find_highest_vector() and count_vectors(): - Instead of using magic values, define and use proper macros. find_highest_vector(): - Remove likely() which is there only for historical reasons and not doing correct branch predictions anymore. Using such heuristics to optimize this function i