From: "Michael S. Tsirkin" <mst@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Lan Tianyu <tianyu.lan@intel.com>,
Yang Zhang <yang.zhang.wz@gmail.com>,
Alex Williamson <alex.williamson@redhat.com>,
kvm@vger.kernel.org,
Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
x86@kernel.org,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Alexander Duyck <alexander.duyck@gmail.com>,
qemu-devel@nongnu.org, Alexander Graf <agraf@suse.de>,
Alexander Duyck <aduyck@mirantis.com>
Subject: Re: [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking
Date: Tue, 5 Jan 2016 13:05:20 +0200 [thread overview]
Message-ID: <20160105130133-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20160105104525.GC2439@work-vm>
On Tue, Jan 05, 2016 at 10:45:25AM +0000, Dr. David Alan Gilbert wrote:
> * Michael S. Tsirkin (mst@redhat.com) wrote:
> > On Tue, Jan 05, 2016 at 10:01:04AM +0000, Dr. David Alan Gilbert wrote:
> > > * Michael S. Tsirkin (mst@redhat.com) wrote:
> > > > On Mon, Jan 04, 2016 at 07:11:25PM -0800, Alexander Duyck wrote:
> > > > > >> The two mechanisms referenced above would likely require coordination with
> > > > > >> QEMU and as such are open to discussion. I haven't attempted to address
> > > > > >> them as I am not sure there is a consensus as of yet. My personal
> > > > > >> preference would be to add a vendor-specific configuration block to the
> > > > > >> emulated pci-bridge interfaces created by QEMU that would allow us to
> > > > > >> essentially extend shpc to support guest live migration with pass-through
> > > > > >> devices.
> > > > > >
> > > > > > shpc?
> > > > >
> > > > > That is kind of what I was thinking. We basically need some mechanism
> > > > > to allow for the host to ask the device to quiesce. It has been
> > > > > proposed to possibly even look at something like an ACPI interface
> > > > > since I know ACPI is used by QEMU to manage hot-plug in the standard
> > > > > case.
> > > > >
> > > > > - Alex
> > > >
> > > >
> > > > Start by using hot-unplug for this!
> > > >
> > > > Really use your patch guest side, and write host side
> > > > to allow starting migration with the device, but
> > > > defer completing it.
> > > >
> > > > So
> > > >
> > > > 1.- host tells guest to start tracking memory writes
> > > > 2.- guest acks
> > > > 3.- migration starts
> > > > 4.- most memory is migrated
> > > > 5.- host tells guest to eject device
> > > > 6.- guest acks
> > > > 7.- stop vm and migrate rest of state
> > > >
> > > >
> > > > It will already be a win since hot unplug after migration starts and
> > > > most memory has been migrated is better than hot unplug before migration
> > > > starts.
> > > >
> > > > Then measure downtime and profile. Then we can look at ways
> > > > to quiesce device faster which really means step 5 is replaced
> > > > with "host tells guest to quiesce device and dirty (or just unmap!)
> > > > all memory mapped for write by device".
> > >
> > >
> > > Doing a hot-unplug is going to upset the guests network stacks view
> > > of the world; that's something we don't want to change.
> > >
> > > Dave
> >
> > It might but if you store the IP and restore it quickly
> > after migration e.g. using guest agent, as opposed to DHCP,
> > then it won't.
>
> I thought if you hot-unplug then it will lose any outstanding connections
> on that device.
Which connections and which device? TCP connections and an ethernet
device? These are on different layers so of course you don't lose them.
Just do not change the IP address.
Some guests send a signal to applications to close connections
when all links go down. One can work around this
in a variety of ways.
> > It allows calming the device down in a generic way,
> > specific drivers can then implement the fast quiesce.
>
> Except that if it breaks the guest networking it's useless.
>
> Dave
>
> >
> > > >
> > > > --
> > > > MST
> > > --
> > > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
> --
> Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2016-01-05 11:05 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-13 21:28 [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking Alexander Duyck
2015-12-13 21:28 ` [Qemu-devel] [RFC PATCH 1/3] swiotlb: Fold static unmap and sync calls into calling functions Alexander Duyck
2015-12-13 21:28 ` [Qemu-devel] [RFC PATCH 2/3] xen/swiotlb: " Alexander Duyck
2015-12-13 21:28 ` [Qemu-devel] [RFC PATCH 3/3] x86: Create dma_mark_dirty to dirty pages used for DMA by VM guest Alexander Duyck
2015-12-14 14:00 ` Michael S. Tsirkin
2015-12-14 16:34 ` Alexander Duyck
2015-12-14 17:20 ` Michael S. Tsirkin
2015-12-14 17:59 ` Alexander Duyck
2015-12-14 20:52 ` Michael S. Tsirkin
2015-12-14 22:32 ` Alexander Duyck
2015-12-14 2:27 ` [Qemu-devel] [RFC PATCH 0/3] x86: Add support for guest DMA dirty page tracking Yang Zhang
2015-12-14 4:54 ` Alexander Duyck
2015-12-14 5:22 ` Yang Zhang
2015-12-14 5:46 ` Alexander Duyck
2015-12-14 7:20 ` Yang Zhang
2015-12-14 14:02 ` Michael S. Tsirkin
2016-01-04 20:41 ` Konrad Rzeszutek Wilk
2016-01-05 3:11 ` Alexander Duyck
2016-01-05 9:40 ` Michael S. Tsirkin
2016-01-05 10:01 ` Dr. David Alan Gilbert
2016-01-05 10:35 ` Michael S. Tsirkin
2016-01-05 10:45 ` Dr. David Alan Gilbert
2016-01-05 10:59 ` Michael S. Tsirkin
2016-01-05 11:03 ` Dr. David Alan Gilbert
2016-01-05 11:11 ` Michael S. Tsirkin
2016-01-05 11:06 ` Michael S. Tsirkin
2016-01-05 11:05 ` Michael S. Tsirkin [this message]
2016-01-05 12:43 ` Dr. David Alan Gilbert
2016-01-05 13:16 ` Michael S. Tsirkin
2016-01-05 18:42 ` Konrad Rzeszutek Wilk
2016-01-05 16:18 ` Alexander Duyck
2016-06-06 9:18 ` Zhou Jie
2016-06-06 16:04 ` Alex Duyck
2016-06-09 10:14 ` Zhou Jie
2016-06-09 15:39 ` Alexander Duyck
2016-06-12 3:03 ` Zhou Jie
2016-06-13 1:28 ` Alexander Duyck
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=20160105130133-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=aduyck@mirantis.com \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=alexander.duyck@gmail.com \
--cc=dgilbert@redhat.com \
--cc=konrad.wilk@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=qemu-devel@nongnu.org \
--cc=tianyu.lan@intel.com \
--cc=x86@kernel.org \
--cc=yang.zhang.wz@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).