From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFJzt-0002SA-S3 for qemu-devel@nongnu.org; Wed, 15 Jul 2015 06:33:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFJzt-0004qQ-71 for qemu-devel@nongnu.org; Wed, 15 Jul 2015 06:33:05 -0400 Date: Wed, 15 Jul 2015 18:32:54 +0800 From: Fam Zheng Message-ID: <20150715103254.GE2412@ad.nay.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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150714123131.GM17927@stefanha-thinkpad.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: Stefan Hajnoczi Cc: Kevin Wolf , qemu-block@nongnu.org, qemu-devel , Alexandre DERUMIER 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. > > > > From my tests, 1ms is not enough, It still hanging in guest or qmp queries. > > 10ms give me optimal balance between bitmap scan speed and guest responsiveness. > > Then I don't fully understand the bug. > > Fam: can you explain why 1ms isn't enough? In Alexandre's case, I suppose it's because the lseek is so slow that sleeping 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 future. Anyway, 10ms wasn't a deliberate choice, because I didn't have one. I agree in other cases, 1ms or less should be enough. Fam