Re: [PATCH v5 2/3] KVM: selftests: randomize which pages are written vs read

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

 



David Matlack <dmatlack@xxxxxxxxxx> writes:

On Fri, Sep 09, 2022 at 12:42:59PM +0000, Colton Lewis wrote:
@@ -248,6 +247,7 @@ static void run_test(enum vm_guest_mode mode, void *arg)
  	for (vcpu_id = 0; vcpu_id < nr_vcpus; vcpu_id++)
  		vcpu_last_completed_iteration[vcpu_id] = -1;

+	perf_test_set_write_percent(vm, 100);

This is a very important line of code and it's not very clear why it's
here to a random reader. Please a comment here so someone doesn't have
to go through the same confusion/debugging we went through to figure out
why this is necessary. e.g.

         /*
          * Use 100% writes during the population phase to ensure all
          * memory is actually populated and not just mapped to the zero
          * page. The prevents expensive copy-on-write faults from
          * occurring during the dirty memory iterations below, which
          * would pollute the performance results.
          */
         perf_test_set_write_percent(vm, 100);

Aside from that,

Reviewed-by: David Matlack <dmatlack@xxxxxxxxxx>


Will do.



[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