On 04.09.24 21:16, Peter Xu wrote:
This value used to reflect the maximum supported memslots from KVM kernel.
Rename it to be clearer, preparing for dynamic sized memslot allocations.

Well, it matches "KVM_CAP_NR_MEMSLOTS" :)

Reviewed-by: David Hildenbrand <da...@redhat.com>

-    for (i = 0; i < s->nr_slots; i++) {
+    for (i = 0; i < s->nr_slots_max; i++) {
          mem = &kml->slots[i];
          /* Discard slots that are empty or do not overlap the section */
          if (!mem->memory_size ||
@@ -1720,11 +1720,11 @@ static void kvm_log_sync_global(MemoryListener *l, bool 
last_stage)
      kvm_dirty_ring_flush();
/*
-     * TODO: make this faster when nr_slots is big while there are
+     * TODO: make this faster when nr_slots_max is big while there are
       * only a few used slots (small VMs).
       */

Interesting TODO!

--
Cheers,

David / dhildenb


Reply via email to