lkml.org 
[lkml]   [2023]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 13/35] KVM: x86: hyper-v: optimize and cleanup kvm_hv_process_stimers()
On Tue, Dec 12, 2023 at 09:22:36AM -0800, Sean Christopherson wrote:
> On Mon, Dec 11, 2023, Yury Norov wrote:
> > The function traverses stimer_pending_bitmap in a for-loop bit by bit.
> > Simplify it by using atomic find_and_set_bit().
>
> for_each_test_and_clear_bit(), not find_and_set_bit().
>
> It might also be nice to call out that there are only 4 bits, i.e. that using
> for_each_test_and_clear_bit() will still generate inline code. Definitely not
> mandatory though, just nice to have (I highly doubt this code would be sensitive
> to using less optimal code).

Sure, will do.

> > While here, refactor the logic by decreasing indentation level.
> >
> > CC: Sean Christopherson <seanjc@google.com>
> > Signed-off-by: Yury Norov <yury.norov@gmail.com>
> > Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> > ---
> > arch/x86/kvm/hyperv.c | 40 ++++++++++++++++++++--------------------
>
> This doesn't conflict with any of the in-flight Hyper-V changes, so with a fixed
> changelog, feel free to take this through the bitmap tree.
>
> Acked-by: Sean Christopherson <seanjc@google.com>

Thank you!

\
 
 \ /
  Last update: 2023-12-12 18:36    [W:0.066 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site