All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Fam Zheng <famz@redhat.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Jeff Cody <jcody@redhat.com>,
	berto@igalia.com, qemu-block@nongnu.org,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 0/3] Fix "stop" draining block jobs
Date: Fri, 03 Apr 2015 13:10:53 +0200	[thread overview]
Message-ID: <551E753D.6060900@redhat.com> (raw)
In-Reply-To: <1428057542-24310-1-git-send-email-famz@redhat.com>



On 03/04/2015 12:38, Fam Zheng wrote:
> Stopping the vm will drive the block job all the way to the end, because the
> sleep duration is too short, which means the block_job_sleep_ns in the block
> jobs are unhelpful. That is because the timer will fire too soon, even before
> the aio_poll in bdrv_drain_all returns.
> 
> Lengthen the sleep and add a test case to catch this issue in the future.
> 
> It's not perfect, because the aio_poll returning point could still be far
> enough that we wake up the job earlier, but this patch is already making it
> better in common cases - setting up a timer with timeout=0 was definitely too
> short anyway.
> 
> A complete solution would be adding a "sleep until next iteration" timer/BH
> API, but I'm not sure that is worth the complexity.

Would it work if vm_stop pauses block jobs before drain, and restarts
the paused ones afterwards?

Paolo

  parent reply	other threads:[~2015-04-03 11:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-03 10:38 [Qemu-devel] [PATCH 0/3] Fix "stop" draining block jobs Fam Zheng
2015-04-03 10:39 ` [Qemu-devel] [PATCH 1/3] blockjob: Don't sleep meaninglessly short Fam Zheng
2015-04-03 10:39 ` [Qemu-devel] [PATCH 2/3] qemu-iotests: Test that "stop" doesn't drain block jobs Fam Zheng
2015-04-03 10:39 ` [Qemu-devel] [PATCH 3/3] blockjob: Update function name in comments Fam Zheng
2015-04-03 11:10 ` Paolo Bonzini [this message]
2015-04-03 12:30   ` [Qemu-devel] [PATCH 0/3] Fix "stop" draining block jobs Fam Zheng

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=551E753D.6060900@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berto@igalia.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.