[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC 23/26] migration/multifd: Device state transfer support -
From: |
Peter Xu |
Subject: |
Re: [PATCH RFC 23/26] migration/multifd: Device state transfer support - send side |
Date: |
Mon, 29 Apr 2024 16:04:27 -0400 |
On Tue, Apr 16, 2024 at 04:43:02PM +0200, Maciej S. Szmigiero wrote:
> +bool multifd_queue_page(RAMBlock *block, ram_addr_t offset)
> +{
> + g_autoptr(GMutexLocker) locker = NULL;
> +
> + /*
> + * Device state submissions for shared channels can come
> + * from multiple threads and conflict with page submissions
> + * with respect to multifd_send_state access.
> + */
> + if (!multifd_send_state->device_state_dedicated_channels) {
> + locker = g_mutex_locker_new(&multifd_send_state->queue_job_mutex);
Haven't read the rest, but suggest to stick with QemuMutex for the whole
patchset, as that's what we use in the rest migration code, along with
QEMU_LOCK_GUARD().
> + }
> +
> + return multifd_queue_page_locked(block, offset);
> +}
--
Peter Xu
- [PATCH RFC 13/26] vfio/migration: Add save_{iterate, complete_precopy}_started trace events, (continued)
- [PATCH RFC 13/26] vfio/migration: Add save_{iterate, complete_precopy}_started trace events, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 14/26] migration/ram: Add load start trace event, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 15/26] migration/multifd: Zero p->flags before starting filling a packet, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 16/26] migration: Add save_live_complete_precopy_async{, wait} handlers, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 18/26] migration: Add load_finish handler and associated functions, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 17/26] migration: Add qemu_loadvm_load_state_buffer() and its handler, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 22/26] migration/multifd: Convert multifd_send_pages::next_channel to atomic, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 21/26] migration/multifd: Device state transfer support - receive side, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 25/26] vfio/migration: Multifd device state transfer support - receive side, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 23/26] migration/multifd: Device state transfer support - send side, Maciej S. Szmigiero, 2024/04/16
- Re: [PATCH RFC 23/26] migration/multifd: Device state transfer support - send side,
Peter Xu <=
- [PATCH RFC 19/26] migration: Add x-multifd-channels-device-state parameter, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 20/26] migration: Add MULTIFD_DEVICE_STATE migration channel type, Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 24/26] migration/multifd: Add migration_has_device_state_support(), Maciej S. Szmigiero, 2024/04/16
- [PATCH RFC 26/26] vfio/migration: Multifd device state transfer support - send side, Maciej S. Szmigiero, 2024/04/16
- Re: [PATCH RFC 00/26] Multifd 🔀 device state transfer support with VFIO consumer, Daniel P . Berrangé, 2024/04/17