public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
	Peter Zijlstra <peterz@infradead.org>,
	kvm@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: virtio balloon: do not call blocking ops when !TASK_RUNNING
Date: Fri, 6 Mar 2015 12:47:32 +0100	[thread overview]
Message-ID: <20150306124732.2bfccd32.cornelia.huck@de.ibm.com> (raw)
In-Reply-To: <20150302204410.GB4942@redhat.com>

On Mon, 2 Mar 2015 21:44:10 +0100
"Michael S. Tsirkin" <mst@redhat.com> wrote:


> > > Normally, hotunplug requires guest cooperation.
> > > IOW unplug request should send guest interrupt,
> > > then block until guest confirms it's not using the
> > > device anymore.
> > > virtio pci already handles that fine, can't ccw
> > > do something similar?
> > 
> > Hotunplug for channel devices does not require guest feedback. (In
> > fact, I was surprised to hear that there is somthing like guest
> > cooperation on other platforms.)
> 
> Consider a storage device. If you don't flush out caches
> before removing the disk, you might lose a bunch of data.

Yes, that is a problem. But hotunplug is indistinguishable from a hw
failure on s390, so there's not really much we can do here.

> 
> > Basically, the guest is simply
> > presented with the fact that the device is gone and has to deal with
> > it. It does not matter whether the device was removed by operator
> > request or due to a hardware failure.
> > 
> > (We do have support in the s390 channel device core to be able to deal
> > with devices going away and coming back gracefully. ccw devices can be
> > put into a special state where they retain their configuration so that
> > they can be reactivated if they become available again. For example,
> > dasd (disk) devices survive being detached and reattached just fine,
> > even under I/O load.
> > See the ->notify() callback of the ccw driver for
> > details.)
> 
> How does guest distinguish between this and intentional permanent
> removal?

It can't. It will get the same kind of notifications (and channel I/O
failures) for both. Only the admin has a chance of knowing, and they
may kill off a device in that state permanently (which, of course,
triggers the flush problems etc. which have just been delayed from the
initial detach).

Given that this is what the architecture gives us on all hypervisors
(LPAR and z/VM) and is for all I know decades old, it is what we have
to implement in qemu/kvm as well.


  reply	other threads:[~2015-03-06 11:47 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-25 10:13 virtio balloon: do not call blocking ops when !TASK_RUNNING Thomas Huth
2015-02-25 11:09 ` Cornelia Huck
2015-02-25 14:17 ` Michael S. Tsirkin
2015-02-26  1:20 ` Rusty Russell
2015-02-26  7:36   ` Thomas Huth
2015-03-02  0:07     ` Rusty Russell
2015-03-02 11:13       ` Michael S. Tsirkin
2015-03-02 11:31         ` Cornelia Huck
2015-03-02 11:46           ` Michael S. Tsirkin
2015-03-02 12:11             ` Cornelia Huck
2015-03-02 12:19               ` Michael S. Tsirkin
2015-03-02 12:35                 ` Cornelia Huck
2015-03-02 20:44                   ` Michael S. Tsirkin
2015-03-06 11:47                     ` Cornelia Huck [this message]
2015-03-02 20:39               ` Michael S. Tsirkin
2015-03-04  6:14         ` Rusty Russell
2015-03-04 10:25           ` Michael S. Tsirkin
2015-03-06 11:56             ` Cornelia Huck
2015-03-10  1:26               ` Rusty Russell
2015-02-26  8:30   ` Michael S. Tsirkin
2015-02-26 17:08     ` Peter Zijlstra
2015-02-26 17:27       ` Michael S. Tsirkin
2015-02-26 17:41         ` Michael S. Tsirkin
2015-02-26  8:45   ` Michael S. Tsirkin
2015-02-26  8:57     ` Cornelia Huck
2015-02-26  8:47   ` Cornelia Huck

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=20150306124732.2bfccd32.cornelia.huck@de.ibm.com \
    --to=cornelia.huck@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rusty@rustcorp.com.au \
    --cc=virtualization@lists.linux-foundation.org \
    /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