From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48593 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLDI9-0006Ay-1X for qemu-devel@nongnu.org; Wed, 24 Nov 2010 06:13:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLDI0-0005qR-TX for qemu-devel@nongnu.org; Wed, 24 Nov 2010 06:13:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55773) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLDI0-0005qI-M2 for qemu-devel@nongnu.org; Wed, 24 Nov 2010 06:13:28 -0500 From: Juan Quintela In-Reply-To: <20101124110426.GE23493@redhat.com> (Michael S. Tsirkin's message of "Wed, 24 Nov 2010 13:04:26 +0200") References: <20101124104035.GB23493@redhat.com> <20101124110426.GE23493@redhat.com> Date: Wed, 24 Nov 2010 12:13:26 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 02/10] Add buffered_file_internal constant List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org "Michael S. Tsirkin" wrote: > On Wed, Nov 24, 2010 at 11:52:25AM +0100, Juan Quintela wrote: >> "Michael S. Tsirkin" wrote: >> > On Wed, Nov 24, 2010 at 12:02:59AM +0100, Juan Quintela wrote: >> >> From: Juan Quintela >> >> >> diff --git a/buffered_file.h b/buffered_file.h >> >> index 98d358b..a728316 100644 >> >> --- a/buffered_file.h >> >> +++ b/buffered_file.h >> >> @@ -21,6 +21,8 @@ typedef void (BufferedPutReadyFunc)(void *opaque); >> >> typedef void (BufferedWaitForUnfreezeFunc)(void *opaque); >> >> typedef int (BufferedCloseFunc)(void *opaque); >> >> >> >> +extern const int buffered_file_interval; >> >> + >> > >> > This shouldn't be exported, IMO. >> >> What do you want? an accessor function? > > I mean an abstraction at qemu_file_ level. > >> Notice that it is a constant. >> We need the value in other places, see the last patch. >> >> Otherwise, I have to pick random numbers like ... 50ms. >> >> Later, Juan. > > If you need a random number, use a random number :) It is not random, it is the bigger number that lets the timer to run at each 100ms O:-) I tried 100ms and 75ms, they got better throughput, but I got still stalls of 1.5s. I could do some search between 50 and 75ms, but the advantage in bandwidth is not so big to complicate things. (150 vs 125s for total migration time or so, and system is quite irresponsive with the bigger value). Later, Juan.