qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre DERUMIER <aderumier@odiso.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan
Date: Thu, 9 Jul 2015 15:18:10 +0200 (CEST)	[thread overview]
Message-ID: <93211748.9122206.1436447890139.JavaMail.zimbra@oxygem.tv> (raw)
In-Reply-To: <20150709130208.GD11166@stefanha-thinkpad.redhat.com>

>>The other block jobs (stream, backup, commit) are still using 
>>a 0 ns delay and are therefore broken. 

Also in mirror.c, they are block_job_sleep_ns with delay_ns, where delay_ns can be 0.

I have seen sometime,some server/qmp hangs, on a pretty old server/slow disks.
(no more in bitmap scan with theses last patches, but on the block mirror itself)


       if (!s->synced) {
            block_job_sleep_ns(&s->common, QEMU_CLOCK_REALTIME, delay_ns);
            if (block_job_is_cancelled(&s->common)) {
                break;
            }
        } else if (!should_complete) {
            delay_ns = (s->in_flight == 0 && cnt == 0 ? SLICE_TIME : 0);


----- Mail original -----
De: "Stefan Hajnoczi" <stefanha@gmail.com>
À: "Fam Zheng" <famz@redhat.com>
Cc: "Kevin Wolf" <kwolf@redhat.com>, "qemu-devel" <qemu-devel@nongnu.org>, qemu-block@nongnu.org
Envoyé: Jeudi 9 Juillet 2015 15:02:08
Objet: Re: [Qemu-devel] [Qemu-block] [PATCH 0/3] mirror: Fix guest responsiveness during bitmap scan

On Thu, Jul 09, 2015 at 11:47:55AM +0800, Fam Zheng wrote: 
> This supersedes: 
> 
> http://patchwork.ozlabs.org/patch/491415/ 
> 
> and [1] which is currently in Jeff's tree. 
> 
> Although [1] fixed the QMP responsiveness, Alexandre DERUMIER reported that 
> guest responsiveness still suffers when we are busy in the initial dirty bitmap 
> scanning loop of mirror job. That is because 1) we issue too many lseeks; 2) we 
> only sleep for 0 ns which turns out quite ineffective in yielding BQL to vcpu 
> threads. Both are fixed. 
> 
> To reproduce: start a guest, attach a 10G raw image, then mirror it. Your 
> guest will immediately start to stutter (with patch [1] testing on a local ext4 
> raw image, and "while echo -n .; do sleep 0.05; done" in guest console). 
> 
> This series adds block_job_relax_cpu as suggested by Stefan Hajnoczi and uses 
> it in mirror job; and lets bdrv_is_allocated_above return a larger p_num as 
> suggested by Paolo Bonzini (although it's done without changing the API). 
> 
> [1]: http://patchwork.ozlabs.org/patch/471656/ "block/mirror: Sleep 
> periodically during bitmap scanning" 
> 
> Fam Zheng (3): 
> blockjob: Introduce block_job_relax_cpu 
> mirror: Use block_job_relax_cpu during bitmap scanning 
> mirror: Speed up bitmap initial scanning 
> 
> block/mirror.c | 17 +++++++---------- 
> include/block/blockjob.h | 16 ++++++++++++++++ 
> 2 files changed, 23 insertions(+), 10 deletions(-) 

This patch only converts the mirror block job to use the new relax 
function. The other block jobs (stream, backup, commit) are still using 
a 0 ns delay and are therefore broken. They should probably be 
converted in the same series. 

  reply	other threads:[~2015-07-09 13:18 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
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 [this message]
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=93211748.9122206.1436447890139.JavaMail.zimbra@oxygem.tv \
    --to=aderumier@odiso.com \
    --cc=famz@redhat.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).