|
From: | Cédric Le Goater |
Subject: | Re: [PATCH v2 15/17] vfio/migration: Multifd device state transfer support - receive side |
Date: | Thu, 12 Sep 2024 10:45:05 +0200 |
User-agent: | Mozilla Thunderbird |
- return vfio_migration_set_state(vbasedev, VFIO_DEVICE_STATE_RESUMING, - vbasedev->migration->device_state, errp); + migration->load_bufs_thread_finished = false; + migration->load_bufs_thread_want_exit = false; + qemu_thread_create(&migration->load_bufs_thread, "vfio-load-bufs", + vfio_load_bufs_thread, opaque, QEMU_THREAD_JOINABLE);The device state save threads are manged by migration core thread pool. Don't we want to apply the same thread management scheme for the load flow as well?I think that (in contrast with the device state saving threads) the buffer loading / reordering thread is an implementation detail of the VFIO driver, so I don't think it really makes sense for multifd code to manage it.
Is it an optimisation then ? In that case, could the implementation not use threads ? VFIO is complex, migration is complex, VFIO migration is even more. TBH, the idea of doing thread management in the VFIO subsystem makes me feel uncomfortable. Thanks, C.
[Prev in Thread] | Current Thread | [Next in Thread] |