Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1277632

Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver

Path csiph.com!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From Alexander Duyck <alexander.duyck@gmail.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver
Date Wed, 25 Nov 2015 18:30:03 +0100
Message-ID <qyM3h-RQ-25@gated-at.bofh.it> (permalink)
References <qymit-n6-3@gated-at.bofh.it> <qymit-n6-1@gated-at.bofh.it> <qytjZ-56r-11@gated-at.bofh.it> <qyBhw-1WU-5@gated-at.bofh.it> <qyHmV-6e1-3@gated-at.bofh.it> <qyKNR-9k-47@gated-at.bofh.it> <qyL7d-gt-31@gated-at.bofh.it> <qyLgT-jU-63@gated-at.bofh.it>
X-Original-To "Michael S. Tsirkin" <mst@redhat.com>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OM4IQxdsMlVRvEEzecCIiTyH/77+wxPHBOGhrFxR+qk=; b=ZVFtOTtUTBSOCama5FBZFuDJjhh2fF7sCcDg9tfji6wbCnUlinNq9grdU9DbciRJ88 DyGves7GRlRKmvaKHzzLa3K09+4tZgPkVDMBsFogAA2pLAFWAxkQYvLcPyVntR1LdA0R kIgKkC9TPPWASIiwFo5lCP9GEi266Ho9ZdXFJ8BHwo1A4sv6w2XJT9bPBRnlK+7QIohW IYylRFrrLV6iTQ67n8CPpWZGi2ga1pKMBjdFUJmV3IKB+sdxQ3N/i2aB4PrsVkMMwPJg +sNMM5gcN2OTZRguJgF/CuOpsL5YAQr+eCLAJeFhR9QbnaeqdS7MnHlBzCH+Np5o+1/l 50Zg==
MIME-Version 1.0
X-Received by 10.107.185.196 with SMTP id j187mr36179685iof.151.1448472291496; Wed, 25 Nov 2015 09:24:51 -0800 (PST)
Content-Type text/plain; charset=UTF-8
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 64
Organization linux.* mail to news gateway
X-Original-Cc "Lan, Tianyu" <tianyu.lan@intel.com>, a.motakis@virtualopensystems.com, Alex Williamson <alex.williamson@redhat.com>, b.reynal@virtualopensystems.com, Bjorn Helgaas <bhelgaas@google.com>, Carolyn Wyborny <carolyn.wyborny@intel.com>, "Skidmore, Donald C" <donald.c.skidmore@intel.com>, eddie.dong@intel.com, nrupal.jani@intel.com, Alexander Graf <agraf@suse.de>, kvm@vger.kernel.org, Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org, "Tantilov, Emil S" <emil.s.tantilov@intel.com>, Or Gerlitz <gerlitz.or@gmail.com>, "Rustad, Mark D" <mark.d.rustad@intel.com>, Eric Auger <eric.auger@linaro.org>, intel-wired-lan <intel-wired-lan@lists.osuosl.org>, Jeff Kirsher <jeffrey.t.kirsher@intel.com>, "Brandeburg, Jesse" <jesse.brandeburg@intel.com>, "Ronciak, John" <john.ronciak@intel.com>, linux-api@vger.kernel.org, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, Mitch Williams <mitch.a.williams@intel.com>, Netdev <netdev@vger.kernel.org>, "Nelson, Shannon" <shannon.nelson@intel.com>, Wei Yang <weiyang@linux.vnet.ibm.com>, zajec5@gmail.com
X-Original-Date Wed, 25 Nov 2015 09:24:51 -0800
X-Original-Message-ID <CAKgT0UcGQoFUy8Y973sfkXZSvCA_wThtuJgmdxeebMsfSjf8Og@mail.gmail.com>
X-Original-References <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> <1448372298-28386-4-git-send-email-tianyu.lan@intel.com> <20151124230551-mutt-send-email-mst@redhat.com> <56554994.1090305@intel.com> <20151125142437-mutt-send-email-mst@redhat.com> <5655DB99.3040007@intel.com> <CAKgT0UdM5NGOARoiCNvh3Hu0xyvfJ-VoRqDu8bg6RyupSCEYHw@mail.gmail.com> <20151125183435-mutt-send-email-mst@redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1277632

Show key headers only | View raw


On Wed, Nov 25, 2015 at 8:39 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> On Wed, Nov 25, 2015 at 08:24:38AM -0800, Alexander Duyck wrote:
>> >> Also, assuming you just want to do ifdown/ifup for some reason, it's
>> >> easy enough to do using a guest agent, in a completely generic way.
>> >>
>> >
>> > Just ifdown/ifup is not enough for migration. It needs to restore some PCI
>> > settings before doing ifup on the target machine
>>
>> That is why I have been suggesting making use of suspend/resume logic
>> that is already in place for PCI power management.  In the case of a
>> suspend/resume we already have to deal with the fact that the device
>> will go through a D0->D3->D0 reset so we have to restore all of the
>> existing state.  It would take a significant load off of Qemu since
>> the guest would be restoring its own state instead of making Qemu have
>> to do all of the device migration work.
>
> That can work, though again, the issue is you need guest
> cooperation to migrate.

Right now the problem is you need to have guest cooperation anyway as
you need to have some way of tracking the dirty pages.  If the IOMMU
on the host were to provide some sort of dirty page tracking then we
could exclude the guest from the equation, but until then we need the
guest to notify us of what pages it is letting the device dirty.  I'm
still of the opinion that the best way to go there is to just modify
the DMA API that is used in the guest so that it supports some sort of
page flag modification or something along those lines so we can track
all of the pages that might be written to by the device.

> If you reset device on destination instead of restoring state,
> then that issue goes away, but maybe the downtime
> will be increased.

Yes, the downtime will be increased, but it shouldn't be by much.
Depending on the setup a VF with a single queue can have about 3MB of
data outstanding when you move the driver over.  After that it is just
a matter of bringing the interface back up which should take only a
few hundred milliseconds assuming the PF is fairly responsive.

> Will it really? I think it's worth it to start with the
> simplest solution (reset on destination) and see
> what the effect is, then add optimizations.

Agreed.  My thought would be to start with something like
dma_mark_clean() that could be used to take care of marking the pages
for migration when they are unmapped or synced.

> One thing that I've been thinking about for a while, is saving (some)
> state speculatively.  For example, notify guest a bit before migration
> is done, so it can save device state. If guest responds quickly, you
> have state that can be restored.  If it doesn't, still migrate, and it
> will have to reset on destination.

I'm not sure how much more device state we really need to save.  The
driver in the guest has to have enough state to recover in the event
of a device failure resulting in a slot reset.  To top it off the
driver is able to reconfigure things probably as quick as we could if
we were restoring the state.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver Lan Tianyu <tianyu.lan@intel.com> - 2015-11-24 15:00 +0100
  Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf  driver "Michael S. Tsirkin" <mst@redhat.com> - 2015-11-24 22:30 +0100
    Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-11-25 06:40 +0100
    Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf  driver Lan Tianyu <tianyu.lan@intel.com> - 2015-11-25 07:00 +0100
      Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf  driver "Michael S. Tsirkin" <mst@redhat.com> - 2015-11-25 13:30 +0100
        Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf  driver "Lan, Tianyu" <tianyu.lan@intel.com> - 2015-11-25 17:10 +0100
          Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf  driver "Michael S. Tsirkin" <mst@redhat.com> - 2015-11-25 17:30 +0100
          Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-11-25 17:30 +0100
            Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf  driver "Michael S. Tsirkin" <mst@redhat.com> - 2015-11-25 17:40 +0100
              Re: [RFC PATCH V2 3/3] Ixgbevf: Add migration support for ixgbevf driver Alexander Duyck <alexander.duyck@gmail.com> - 2015-11-25 18:30 +0100

csiph-web