linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: liulongfang <liulongfang@huawei.com>
Cc: <jgg@nvidia.com>, <shameerali.kolothum.thodi@huawei.com>,
	<jonathan.cameron@huawei.com>, <cohuck@redhat.com>,
	<linux-kernel@vger.kernel.org>, <linuxarm@openeuler.org>
Subject: Re: [PATCH v7 1/5] vfio/migration: Add debugfs to live migration driver
Date: Wed, 1 Feb 2023 09:36:44 -0700	[thread overview]
Message-ID: <20230201093644.4983db0d.alex.williamson@redhat.com> (raw)
In-Reply-To: <add8f068-3aaa-0707-bfe6-27fd8bf9e10c@huawei.com>

On Wed, 1 Feb 2023 11:20:08 +0800
liulongfang <liulongfang@huawei.com> wrote:

> On 2023/1/27 3:27, Alex Williamson wrote:
> > On Fri, 20 Jan 2023 11:29:26 +0800
> > Longfang Liu <liulongfang@huawei.com> wrote:
> >   
> >> There are multiple devices, software and operational steps involved
> >> in the process of live migration. An error occurred on any node may
> >> cause the live migration operation to fail.
> >> This complex process makes it very difficult to locate and analyze
> >> the cause when the function fails.
> >>
> >> In order to quickly locate the cause of the problem when the
> >> live migration fails, I added a set of debugfs to the vfio
> >> live migration driver.
> >>
> >>  +------------------------------------------+
> >>  |                                          |
> >>  |                                          |
> >>  |                 QEMU                     |
> >>  |                                          |
> >>  |                                          |
> >>  +-----+-------------------------+----------+
> >>        |   ^                     |   ^
> >>        v   |                     v   |
> >>      +-----+--+                +-----+--+
> >>      | src VF |                | dst VF |
> >>      +-+------+                +-+------+
> >>        |   ^                     |   ^
> >>        v   |                     v   |
> >>  +-------+-+------+        +-------+-+------+
> >>  |Debugfs|state   |        |Debugfs|state   |
> >>  +-------+--------+        +-------+--------+
> >>  |   debug_root   |        |   debug_root   |
> >>  +-------+--------+        +-------+--------+
> >>
> >> The entire debugfs directory will be based on the definition of
> >> the CONFIG_DEBUG_FS macro. If this macro is not enabled, the
> >> interfaces in vfio_pci_debugfs.h will be empty definitions,
> >> and the creation and initialization of the debugfs directory
> >> will not be executed.
> >>
> >> debugfs will create a public root directory "vfio_mig" file.
> >> then create a "debug_root" file for each live migration VF device.  
> > 
> > s/VF // In practice it may be VFs, but I don't think we want to
> > artificially imply that the device must be a VF.  In fact, I'm not sure  
> 
> Yes, the description should be modified here, and it should not be limited
> to only support VF.
> 
> > why any of this code lives in vfio/pci/ vs vfio/, there's nothing PCI
> > specific here.  Why isn't all of this done in vfio_main to be shared
> > with both pci and non-pci vfio drivers and devices?
> >  
> 
> Combined with your observations below, I think it is more appropriate to
> create a "vfio-pci" directory here, because the current live migration
> function is still used on pci devices.
> 
> For non-pci devices, if there is a device that needs to add debugfs,
> then it can create a similar directory.

But live migration itself is not specific to vfio-pci, it's device
agnostic.  We'd certainly expect to see mdev devices supporting
migration in the near term.  Thanks,

Alex


  reply	other threads:[~2023-02-01 16:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20  3:29 [PATCH v7 0/5] add debugfs to migration driver Longfang Liu
2023-01-20  3:29 ` [PATCH v7 1/5] vfio/migration: Add debugfs to live " Longfang Liu
2023-01-26 19:27   ` Alex Williamson
2023-02-01  3:20     ` liulongfang
2023-02-01 16:36       ` Alex Williamson [this message]
2023-01-20  3:29 ` [PATCH v7 2/5] hisi_acc_vfio_pci: extract public functions for container_of Longfang Liu
2023-01-20  3:29 ` [PATCH v7 3/5] hisi_acc_vfio_pci: register debugfs for hisilicon migration driver Longfang Liu
2023-01-26 19:28   ` Alex Williamson
2023-02-01  3:24     ` liulongfang
2023-01-20  3:29 ` [PATCH v7 4/5] Documentation: add debugfs description for hisi_acc_vfio_pci Longfang Liu
2023-01-26 19:28   ` Alex Williamson
2023-02-01  3:26     ` liulongfang
2023-01-20  3:29 ` [PATCH v7 5/5] vfio: update live migration device status Longfang Liu
2023-01-26 19:28   ` Alex Williamson
2023-02-01  3:36     ` liulongfang

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=20230201093644.4983db0d.alex.williamson@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=jonathan.cameron@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@openeuler.org \
    --cc=liulongfang@huawei.com \
    --cc=shameerali.kolothum.thodi@huawei.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).