Messages in this thread | | | Date | Tue, 12 Dec 2023 09:35:59 -0800 | From | Yury Norov <> | Subject | Re: [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!
| |