Hi Peter, No objection to removing the dead code — it clearly never worked
I do have one question about the direction, though. The removed logic was the only in-tree attempt at MR unregistration for the non-pin-all path. Without it, registered MRs grow monotonically over a migration, and with large, widely-spread dirty memory over chunks the accumulated MR metadata (user + kernel) can cost more than pin-all and even perform worse — which rather defeats the purpose of not pinning everything. do we still intend to keep and improve the non-pin-all path going forward? If so, some form of dynamic MR unregistration will eventually be needed and it might be worth keeping this code,or at least leaving a TODO to mark the gap? Thanks, Yanfei On 2026/8/18 04:24, Peter Xu wrote:
The unregister code was there since the first commit RDMA migration was merged, but it was never functioning. Remove the dead code. Since the two control messages are the last ones, we don't even need to worry about compatibility of legacy RDMA control commands, we can directly remove the messages too. As a side effect, this patch closes a report by removing the code completely. Reported-by: Tristan (@TristanInSec) Closes:https://gitlab.com/qemu-project/qemu/-/work_items/4003 Signed-off-by: Peter Xu<[email protected]>
