Re: [PATCH v2 5/5] KVM: Use mask of harvested dirty ring entries to coalesce dirty ring resets

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

 



On Thu, May 8, 2025 at 7:12 AM Sean Christopherson <seanjc@xxxxxxxxxx> wrote:
>
> Use "mask" instead of a dedicated boolean to track whether or not there
> is at least one to-be-reset entry for the current slot+offset.  In the
> body of the loop, mask is zero only on the first iteration, i.e. !mask is
> equivalent to first_round.
>
> Opportunstically combine the adjacent "if (mask)" statements into a single
> if-statement.
>
> No function change intended.

nit: "Opportunistically" and "functional" :)

>
> Cc: Peter Xu <peterx@xxxxxxxxxx>
> Cc: Yan Zhao <yan.y.zhao@xxxxxxxxx>
> Cc: Maxim Levitsky <mlevitsk@xxxxxxxxxx>
> Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>

Thanks, Sean! This logic is much easier to read now.

Feel free to add to the entire series if you'd like:

Reviewed-by: James Houghton <jthoughton@xxxxxxxxxx>





[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