From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUkJs-000838-Sa for qemu-devel@nongnu.org; Tue, 23 Apr 2013 17:00:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUkJr-00081d-N7 for qemu-devel@nongnu.org; Tue, 23 Apr 2013 17:00:08 -0400 Received: from mail-qc0-x22d.google.com ([2607:f8b0:400d:c01::22d]:34666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUkJr-00081W-J9 for qemu-devel@nongnu.org; Tue, 23 Apr 2013 17:00:07 -0400 Received: by mail-qc0-f173.google.com with SMTP id b12so567762qca.18 for ; Tue, 23 Apr 2013 14:00:07 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <5176F647.6010302@redhat.com> Date: Tue, 23 Apr 2013 22:59:51 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1366682139-22122-1-git-send-email-mrhines@linux.vnet.ibm.com> <1366682139-22122-12-git-send-email-mrhines@linux.vnet.ibm.com> In-Reply-To: <1366682139-22122-12-git-send-email-mrhines@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v5 11/12] rdma: core logic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: mrhines@linux.vnet.ibm.com Cc: aliguori@us.ibm.com, quintela@redhat.com, qemu-devel@nongnu.org, owasserm@redhat.com, abali@us.ibm.com, mrhines@us.ibm.com, gokul@us.ibm.com Il 23/04/2013 03:55, mrhines@linux.vnet.ibm.com ha scritto: > +static size_t qemu_rdma_get_max_size(QEMUFile *f, void *opaque, > + uint64_t transferred_bytes, > + uint64_t time_spent, > + uint64_t max_downtime) > +{ > + static uint64_t largest = 1; > + uint64_t max_size = ((double) (transferred_bytes / time_spent)) > + * max_downtime / 1000000; > + > + if (max_size > largest) { > + largest = max_size; > + } > + > + DPRINTF("MBPS: %f, max_size: %" PRIu64 " largest: %" PRIu64 "\n", > + qemu_get_mbps(), max_size, largest); > + > + return largest; > +} Can you point me to the discussion of this algorithmic change and qemu_get_max_size? It seems to me that it assumes that the IB link is basically dedicated to migration. I think it is a big assumption and it may be hiding a bug elsewhere. At the very least, it should be moved to a separate commit and described in the commit message, but actually I'd prefer to not include it in the first submission. Paolo