[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 03/21] migration: remove unreachble RDMA code in save_hook
From: |
Juan Quintela |
Subject: |
Re: [PATCH v2 03/21] migration: remove unreachble RDMA code in save_hook impl |
Date: |
Mon, 20 Jun 2022 17:11:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
Daniel P. Berrangé <berrange@redhat.com> wrote:
> The QEMUFile 'save_hook' callback has a 'size_t size' parameter.
>
> The RDMA impl of this has logic that takes different actions
> depending on whether the value is zero or non-zero. It has
> commented out logic that would have taken further actions
> if the value was negative.
>
> The only place where the 'save_hook' callback is invoked is
> the ram_control_save_page() method, which passes 'size'
> through from its caller. The only caller of this method is
> in turn control_save_page(). This method unconditionally
> passes the 'TARGET_PAGE_SIZE' constant for the 'size' parameter.
>
> IOW, the only scenario for 'size' that can execute in the
> qemu_rdma_save_page method is 'size > 0'. The remaining code
> has been unreachable since RDMA support was first introduced
> 9 years ago.
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
You missed this call:
@@ -1571,18 +1547,6 @@ static uint64_t qemu_rdma_poll(RDMAContext *rdma, struct
ibv_cq *cq,
if (rdma->nb_sent > 0) {
rdma->nb_sent--;
}
-
- if (!rdma->pin_all) {
- /*
- * FYI: If one wanted to signal a specific chunk to be unregistered
- * using LRU or workload-specific information, this is the function
- * you would call to do so. That chunk would then get
asynchronously
- * unregistered later.
- */
-#ifdef RDMA_UNREGISTRATION_EXAMPLE
- qemu_rdma_signal_unregister(rdma, index, chunk, wc.wr_id);
-#endif
- }
But as RDMA_UNREGISTRATION_EXAMPLE has never been set, I am sending a
separate patch to remove it.
Later, Juan.
- [PATCH v2 00/21] migration: remove QEMUFileOps concept and assume use of QIOChannel, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 02/21] migration: switch to use QIOChannelNull for dummy channel, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 01/21] io: add a QIOChannelNull equivalent to /dev/null, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 03/21] migration: remove unreachble RDMA code in save_hook impl, Daniel P . Berrangé, 2022/06/20
- Re: [PATCH v2 03/21] migration: remove unreachble RDMA code in save_hook impl,
Juan Quintela <=
- [PATCH v2 05/21] migration: rename 'pos' field in QEMUFile to 'bytes_processed', Daniel P . Berrangé, 2022/06/20
- [PATCH v2 06/21] migration: rename qemu_ftell to qemu_file_total_transferred, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 04/21] migration: rename rate limiting fields in QEMUFile, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 10/21] migration: convert savevm to use QIOChannelBlock for VMState, Daniel P . Berrangé, 2022/06/20
- [PATCH v2 13/21] migration: introduce new constructors for QEMUFile, Daniel P . Berrangé, 2022/06/20