From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=48466 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PLHnA-0007fL-2z for qemu-devel@nongnu.org; Wed, 24 Nov 2010 11:02:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PLHkr-0006Dt-NV for qemu-devel@nongnu.org; Wed, 24 Nov 2010 11:00:46 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10970) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PLHkr-0006Dk-Br for qemu-devel@nongnu.org; Wed, 24 Nov 2010 10:59:33 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oAOFxWYo025750 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 24 Nov 2010 10:59:32 -0500 Date: Wed, 24 Nov 2010 17:59:19 +0200 From: "Michael S. Tsirkin" Message-ID: <20101124155919.GB29235@redhat.com> References: <9b23b9b4cee242591bdb356c838a9cfb9af033c1.1290552026.git.quintela@redhat.com> <20101124104010.GA23493@redhat.com> <20101124111442.GF23493@redhat.com> <4CED2C34.4000503@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CED2C34.4000503@redhat.com> Subject: [Qemu-devel] Re: [PATCH 09/10] Exit loop if we have been there too long List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel@nongnu.org, Juan Quintela On Wed, Nov 24, 2010 at 04:16:04PM +0100, Paolo Bonzini wrote: > On 11/24/2010 12:14 PM, Michael S. Tsirkin wrote: > >>> buffered_file timer runs each 100ms. And we "try" to measure channel > >>> bandwidth from there. If we are not able to run the timer, all the > >>> calculations are wrong, and then stalls happens. > > > >So the problem is the timer in the buffered file abstraction? > >Why don't we just flush out data if the buffer is full? > > It takes a lot to fill the buffer if you have many zero pages, and > if that happens the guest is starved by the main loop filling the > buffer. > > Paolo To solve starvation we really should return to main loop as soon as possible, give io a chance to run. The timer based hack is probably the best we can do by 0.14, though. -- MST