From: Fam Zheng <famz@redhat.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, qemu-devel <qemu-devel@nongnu.org>,
Alexandre DERUMIER <aderumier@odiso.com>
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 1/3] blockjob: Introduce block_job_relax_cpu
Date: Wed, 15 Jul 2015 18:32:54 +0800 [thread overview]
Message-ID: <20150715103254.GE2412@ad.nay.redhat.com> (raw)
In-Reply-To: <20150714123131.GM17927@stefanha-thinkpad.redhat.com>
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
next prev parent reply other threads:[~2015-07-15 10:33 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 3:47 [Qemu-devel] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan Fam Zheng
2015-07-09 3:47 ` [Qemu-devel] [PATCH 1/3] blockjob: Introduce block_job_relax_cpu Fam Zheng
2015-07-09 12:54 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-07-10 3:42 ` Alexandre DERUMIER
2015-07-14 12:31 ` Stefan Hajnoczi
2015-07-15 10:32 ` Fam Zheng [this message]
2015-07-16 13:21 ` Stefan Hajnoczi
2015-07-09 3:47 ` [Qemu-devel] [PATCH 2/3] mirror: Use block_job_relax_cpu during bitmap scanning Fam Zheng
2015-07-09 13:00 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-07-09 3:47 ` [Qemu-devel] [PATCH 3/3] mirror: Speed up bitmap initial scanning Fam Zheng
2015-07-09 13:00 ` Stefan Hajnoczi
2015-07-14 13:21 ` Stefan Hajnoczi
2015-07-09 11:51 ` [Qemu-devel] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan Alexandre DERUMIER
2015-07-09 13:02 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2015-07-09 13:18 ` Alexandre DERUMIER
2015-07-10 6:43 ` Fam Zheng
2015-07-10 6:54 ` Alexandre DERUMIER
2015-07-10 7:13 ` Fam Zheng
2015-07-10 10:36 ` Alexandre DERUMIER
2015-07-10 12:16 ` Alexandre DERUMIER
2015-07-13 5:08 ` Fam Zheng
2015-07-14 12:40 ` Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150715103254.GE2412@ad.nay.redhat.com \
--to=famz@redhat.com \
--cc=aderumier@odiso.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).