qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>, kwolf@redhat.com
Cc: mtosatti@redhat.com, qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] [PATCHv3 4/6] virtio-net: stop/start bh when appropriate
Date: Thu, 2 Dec 2010 20:27:22 +0200	[thread overview]
Message-ID: <20101202182722.GA7211@redhat.com> (raw)
In-Reply-To: <19703.43787.213477.834653@gargle.gargle.HOWL>

On Thu, Dec 02, 2010 at 10:19:55PM +0800, Jason Wang wrote:
> Michael S. Tsirkin writes:
>  > On Thu, Dec 02, 2010 at 08:56:30PM +0800, Jason Wang wrote:
>  > > Michael S. Tsirkin writes:
>  > >  > On Wed, Dec 01, 2010 at 01:45:09PM +0800, Jason Wang wrote:
>  > >  > > Michael S. Tsirkin writes:
>  > >  > >  > Avoid sending out packets, and modifying
>  > >  > >  > device state, when VM is stopped.
>  > >  > >  > Add assert statements to verify this does not happen.
>  > >  > >  > 
>  > >  > >  > Avoid scheduling bh when vhost-net is started.
>  > >  > >  > 
>  > >  > >  > Stop bh when driver disabled bus mastering
>  > >  > >  > (we must not access memory after this).
>  > >  > >  > 
>  > >  > >  > Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
>  > >  > >  > 
>  > >  > > 
>  > >  > > There's no need to disable it bh we call qemu_aio_flush() after
>  > >  > > vm_state_notify() in do_vm_stop(). And for timer, looks like every device should
>  > >  > > stop its timer in vm state change handler, not only for virtio-net?
>  > >  > 
>  > >  > BTW I fixed some typos. Here a fixed version.
>  > >  > Jason, could you review/test please?
>  > >  > 
>  > > 
>  > > Have done the test, it's more stable than before but still get small deltas in
>  > > cpu section.
>  > 
>  > And just to clarify: no more deltas in the memory section?
>  > 
> 
> Yes.
> 
> And the offset for cpu section is 1161-1165 and sometimes I get deltas for ide
> section at offset 295 and 314.


Kevin, could you take a look please?

Jason, does the following do anything?

Subject: ide: cancel bh on vm stop

If bh is running on vm stop, ide state might change
after vm stop is completed. Solve by deleting bh on stop.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

diff --git a/hw/ide/core.c b/hw/ide/core.c
index 484e0ca..8d86114 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -698,8 +698,13 @@ void ide_dma_restart_cb(void *opaque, int running, int reason)
 {
     BMDMAState *bm = opaque;
 
-    if (!running)
+    if (!running) {
+        if (bm->bh) {
+            qemu_bh_delete(bm->bh);
+            bm->bh = NULL;
+        }
         return;
+    }
 
     if (!bm->bh) {
         bm->bh = qemu_bh_new(ide_dma_restart_bh, bm);

  parent reply	other threads:[~2010-12-02 18:29 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-24 15:52 [Qemu-devel] [PATCHv2 0/6] stable migration image on a stopped vm Michael S. Tsirkin
2010-11-24 15:52 ` [Qemu-devel] [PATCHv2 1/6] virtio-net: don't dma while vm is stopped Michael S. Tsirkin
2010-11-24 15:52 ` [Qemu-devel] [PATCHv2 2/6] cpus: flush all requests on each vm stop Michael S. Tsirkin
2010-11-30 12:45   ` Marcelo Tosatti
2010-11-30 13:14     ` Michael S. Tsirkin
2010-11-30 13:34     ` Michael S. Tsirkin
2010-11-30 13:46       ` Marcelo Tosatti
2010-11-30 14:05         ` Michael S. Tsirkin
2010-12-03 16:30           ` Marcelo Tosatti
2010-11-24 15:53 ` [Qemu-devel] [PATCHv2 3/6] migration/savevm: no need to flush requests Michael S. Tsirkin
2010-11-24 15:53 ` [Qemu-devel] [PATCHv2 4/6] virtio-net: stop/start bh on vm start/stop Michael S. Tsirkin
2010-11-29 15:37   ` [Qemu-devel] [PATCHv3 4/6] virtio-net: stop/start bh when appropriate Michael S. Tsirkin
2010-12-01  5:45     ` Jason Wang
2010-12-01  5:59       ` Michael S. Tsirkin
2010-12-03  8:40         ` Kevin Wolf
2010-12-01  6:02       ` Michael S. Tsirkin
2010-12-01  6:17         ` Jason Wang
2010-12-02 12:56         ` Jason Wang
2010-12-02 13:07           ` Michael S. Tsirkin
2010-12-02 13:08           ` Michael S. Tsirkin
2010-12-02 14:19             ` Jason Wang
2010-12-02 15:38               ` Michael S. Tsirkin
2010-12-03 13:32                 ` Jason Wang
2010-12-02 18:27               ` Michael S. Tsirkin [this message]
2010-12-03  8:39                 ` Kevin Wolf
2010-11-24 15:53 ` [Qemu-devel] [PATCHv2 5/6] migration: stable ram block ordering Michael S. Tsirkin
2010-11-24 15:53 ` [Qemu-devel] [PATCHv2 6/6] migration: allow rate > 4g Michael S. Tsirkin

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=20101202182722.GA7211@redhat.com \
    --to=mst@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@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 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).