]> git.proxmox.com Git - pve-qemu-kvm.git/commit
mirror sleep : set sleep to SLICE_TIME/10 (10ms)
authorAlexandre Derumier <aderumier@odiso.com>
Thu, 2 Jul 2015 05:31:58 +0000 (07:31 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 2 Jul 2015 05:38:51 +0000 (07:38 +0200)
commit09072f679781b99da0b83979e1c9254fe5e2a55e
treef48b3550d82b6f16cb0e2cff010b0502efdafc3a
parent75b6a4f86c21a718ac8d91edac2f7b9115594223
mirror sleep : set sleep to SLICE_TIME/10 (10ms)

Current make too much sleep because

if (now - last_pause_ns > SLICE_TIME) {
         last_pause_ns = now;
         block_job_sleep_ns(&s->common, QEMU_CLOCK_REALTIME, SLICE_TIME);

so, we sleep SLICE_TIME, then at next iteration if lastpause("SLICE_TIME") > SLICE_TIME, we sleep again.
So, it almost always sleep at each iteration.

This patch set the sleep value to  SLICE_TIME/10.

I have benched it, I have very scanning speed without impacting vm performance.

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
debian/patches/mirror-sleep2.patch