Re: [PATCH v2 1/2] hisi_acc_vfio_pci: Add debugfs to migration driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Nov 04, 2022 at 11:22:51AM +0800, liulongfang wrote:
> On 2022/11/4 4:21, Alex Williamson wrote:
> > [Cc +kvm list]
> > 
> > On Wed, 19 Oct 2022 16:10:32 +0800
> > Longfang Liu <liulongfang@xxxxxxxxxx> 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 accelerator
> >> live migration driver.
> >>
> >>  +-----------------------------------+
> >>  |                                   |
> >>  |                QEMU               |
> >>  |                                   |
> >>  +---+--^--------------------+--^----+
> >>      |  |                    |  |
> >>      |  |                    |  |
> >>  +---v--+----+           +---v--+----+
> >>  |           |           |           |
> >>  |   src VF  |           |  dest VF  |
> >>  |           |           |           |
> >>  +---+--^----+           +---+--^----+
> >>      |  |                    |  |
> >>      |  |                    |  |
> >>  +---v--+----+           +---v--+----+
> >>  |  Debugfs  |           |  Debugfs  |
> >>  +-----+-----+           +-----+-----+
> >>  |state|debug|           |state|debug|
> >>  +-----+-----+           +-----+-----+
> >>
> >> This set of debugfs will create two files for each VF device:
> >> a state file and a debug file.
> >>
> >> The migration status of the current VF device can be obtained by
> >> reading the status file.
> >>
> >> The live migration function of the current device can be tested by
> >> operating the debug file, and the functional status of the equipment
> >> and software at each stage can be tested step by step without
> >> performing the complete live migration function. And after the live
> >> migration is performed, the migration device data of the live migration
> >> can be obtained through the debug file.
> > 
> > This is proposed as an hisi_vfio_acc specific debugfs interface, but
> > common code could certainly implement much of this as well.  Should we
> > have generic support for debugfs?
> > 
> 
> OK, I'd love to extend this part of the debugfs functionality into the
> vfio framework and make it a common debugfs functionality for all
> device drivers that use live migration.

Yeah, it is an interesting idea for sure

Jason



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux