Received: from eggs.gnu.org ([2001:4830:134:3::10]:34613) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFj6M-0000bG-Bl for qemu-devel@nongnu.org; Thu, 16 Jul 2015 09:21:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFj6I-0003ag-5z for qemu-devel@nongnu.org; Thu, 16 Jul 2015 09:21:26 -0400 Date: Thu, 16 Jul 2015 14:21:17 +0100 From: Stefan Hajnoczi Message-ID: <20150716132117.GC16984@stefanha-thinkpad.redhat.com> References: <1436413678-7114-1-git-send-email-famz@redhat.com> <1436413678-7114-2-git-send-email-famz@redhat.com> <20150709125455.GA11166@stefanha-thinkpad.redhat.com> <1233193551.9344767.1436499768115.JavaMail.zimbra@oxygem.tv> <20150714123131.GM17927@stefanha-thinkpad.redhat.com> <20150715103254.GE2412@ad.nay.redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="adJ1OR3c6QgCpb/j" Content-Disposition: inline In-Reply-To: <20150715103254.GE2412@ad.nay.redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 1/3] blockjob: Introduce block_job_relax_cpu List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: Kevin Wolf , qemu-block@nongnu.org, qemu-devel , Alexandre DERUMIER --adJ1OR3c6QgCpb/j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 15, 2015 at 06:32:54PM +0800, Fam Zheng wrote: > On Tue, 07/14 13:31, Stefan Hajnoczi wrote: > > On Fri, Jul 10, 2015 at 05:42:48AM +0200, Alexandre DERUMIER wrote: > > > >>By the way, why did you choose 10 milliseconds? That is quite long. > > > >> > > > >>If this function is called once per 10 ms disk I/O operations then = we > > > >>lose 50% utilization. 1 ms or less would be reasonable. > > >=20 > > > From my tests, 1ms is not enough, It still hanging in guest or qmp qu= eries. > > > 10ms give me optimal balance between bitmap scan speed and guest resp= onsiveness. > >=20 > > Then I don't fully understand the bug. > >=20 > > Fam: can you explain why 1ms isn't enough? >=20 > In Alexandre's case, I suppose it's because the lseek is so slow that sle= eping > for 1ms would still let mirror coroutine to occupy, say, 90% of CPU time,= so > guest IO stutters. Perhaps we could move lseek to thread pool in the futu= re. Right, that's the real problem here. If lseek is done in a worker thread than the coroutine yields in the meantime and the responsiveness problem is solved. This sounds like an important fix in the early 2.5 release cycle. --adJ1OR3c6QgCpb/j Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVp6/NAAoJEJykq7OBq3PIEKcIAIkAjRA56gcGA3/AED03QPt+ FwBEBXJ0kDkuZ9TGJSgKl5VQsoc4JX5Znjs0+lXk6K6k+XEdUv7oQR8WzN/wSrAC 2HTiSv1c/schneARkg12iL94lALxAWnt/vCOGtdxWFXdtRx/LHPJe2QUCw7MYQEm +sPECwU3pL0t+558bi9fUA6zpK+Rh3AptQsvNsKFYdH4utOQeT1cP5vyRRSGE5Nr hEvCMqPzbsK/YE1YmTAt3Pru9cug+2KA0sMOi8h7NNEWB3CmOTXUqGNd6iG2v+7E I6TqozHs/rXkiLCM8T+oAjOC61Wop1QPkK1lJideyA2hl4PqKrEgLqPlNWw/5v8= =IzPJ -----END PGP SIGNATURE----- --adJ1OR3c6QgCpb/j--