qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]