Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-24 Thread Avihai Horon
On 5/18/2022 6:50 PM, Jason Gunthorpe wrote: On Wed, May 18, 2022 at 01:39:31PM +0200, Juan Quintela wrote: That does seem like a defect in this patch, any SLA constraints should still all be checked under the assumption all ram is dirty. And how are we going to: - detect the network link sp

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-23 Thread Joao Martins
On 5/23/22 07:11, Avihai Horon wrote: > On 5/20/2022 1:58 PM, Joao Martins wrote: >>> +migrate_get_current()->skip_precopy = true; >>> +} >>> + >> Perhaps it might be easier to reuse the existing knob to disable pre-copy >> per device that Kirti added some time ago, rather than changing

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-22 Thread Avihai Horon
On 5/20/2022 1:58 PM, Joao Martins wrote: External email: Use caution opening links or attachments On 5/12/22 16:43, Avihai Horon wrote: diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c index 21e8f9d4d4..d4b6653026 100644 --- a/hw/vfio/migration.c +++ b/hw/vfio/migration.c @@ -863,10 +

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-20 Thread Joao Martins
On 5/12/22 16:43, Avihai Horon wrote: > diff --git a/hw/vfio/migration.c b/hw/vfio/migration.c > index 21e8f9d4d4..d4b6653026 100644 > --- a/hw/vfio/migration.c > +++ b/hw/vfio/migration.c > @@ -863,10 +863,17 @@ int vfio_migration_probe(VFIODevice *vbasedev, Error > **errp) > struct vfio_reg

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-18 Thread Jason Gunthorpe
On Tue, May 17, 2022 at 09:46:56PM -0600, Alex Williamson wrote: > The current solution is obviously non-optimal, it was mainly > meant for backwards compatibility, but this seems like a fail faster > solution, with less useless work, but also providing less indication > how to configure the migra

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-18 Thread Jason Gunthorpe
On Wed, May 18, 2022 at 01:39:31PM +0200, Juan Quintela wrote: > > That does seem like a defect in this patch, any SLA constraints should > > still all be checked under the assumption all ram is dirty. > > And how are we going to: > - detect the network link speed > - to be sure that we are insid

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-18 Thread Juan Quintela
Jason Gunthorpe wrote: > On Tue, May 17, 2022 at 10:00:45AM -0600, Alex Williamson wrote: > >> > This is really intended to be a NOP from where things are now, as if >> > you use mlx5 live migration without a patch like this then it causes a >> > botched pre-copy since everything just ends up perm

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-17 Thread Alex Williamson
On Tue, 17 May 2022 14:39:37 -0300 Jason Gunthorpe wrote: > On Tue, May 17, 2022 at 11:22:32AM -0600, Alex Williamson wrote: > > > > > It seems like a better solution would be to expose to management > > > > tools that the VM contains a device that does not support the > > > > pre-copy phase so

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-17 Thread Jason Gunthorpe
On Tue, May 17, 2022 at 11:22:32AM -0600, Alex Williamson wrote: > > > It seems like a better solution would be to expose to management > > > tools that the VM contains a device that does not support the > > > pre-copy phase so that downtime expectations can be adjusted. > > > > I don't expect

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-17 Thread Alex Williamson
On Tue, 17 May 2022 13:08:44 -0300 Jason Gunthorpe wrote: > On Tue, May 17, 2022 at 10:00:45AM -0600, Alex Williamson wrote: > > > > This is really intended to be a NOP from where things are now, as if > > > you use mlx5 live migration without a patch like this then it causes a > > > botched pre

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-17 Thread Jason Gunthorpe
On Tue, May 17, 2022 at 10:00:45AM -0600, Alex Williamson wrote: > > This is really intended to be a NOP from where things are now, as if > > you use mlx5 live migration without a patch like this then it causes a > > botched pre-copy since everything just ends up permanently dirty. > > > > If it

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-17 Thread Alex Williamson
On Mon, 16 May 2022 20:08:32 -0300 Jason Gunthorpe wrote: > On Mon, May 16, 2022 at 02:22:00PM -0600, Alex Williamson wrote: > > On Mon, 16 May 2022 13:22:14 +0200 > > Juan Quintela wrote: > > > > > Avihai Horon wrote: > > > > Currently, if IOMMU of a VFIO container doesn't support dirty p

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-16 Thread Jason Gunthorpe
On Mon, May 16, 2022 at 02:22:00PM -0600, Alex Williamson wrote: > On Mon, 16 May 2022 13:22:14 +0200 > Juan Quintela wrote: > > > Avihai Horon wrote: > > > Currently, if IOMMU of a VFIO container doesn't support dirty page > > > tracking, migration is blocked completely. This is because a DMA-a

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-16 Thread Alex Williamson
On Mon, 16 May 2022 13:22:14 +0200 Juan Quintela wrote: > Avihai Horon wrote: > > Currently, if IOMMU of a VFIO container doesn't support dirty page > > tracking, migration is blocked completely. This is because a DMA-able > > VFIO device can dirty RAM pages without updating QEMU about it, thus

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-16 Thread Juan Quintela
Avihai Horon wrote: > Currently, if IOMMU of a VFIO container doesn't support dirty page > tracking, migration is blocked completely. This is because a DMA-able > VFIO device can dirty RAM pages without updating QEMU about it, thus > breaking the migration. > > However, this doesn't mean that migr

[PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-12 Thread Avihai Horon
Currently, if IOMMU of a VFIO container doesn't support dirty page tracking, migration is blocked completely. This is because a DMA-able VFIO device can dirty RAM pages without updating QEMU about it, thus breaking the migration. However, this doesn't mean that migration can't be done at all. If m