All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yanfei Xu <isyanfei.xu@gmail.com>
To: Peter Xu <peterx@redhat.com>
Cc: qemu-devel@nongnu.org, Li Zhijian <lizhijian@fujitsu.com>,
	Samuel Zhang <guoqing.zhang@amd.com>,
	Fabiano Rosas <farosas@suse.de>, Jack Wang <jinpu.wang@ionos.com>,
	Juraj Marcin <jmarcin@redhat.com>,
	Yanfei Xu <yanfei.xu@bytedance.com>
Subject: Re: [PATCH 02/10] migration/rdma: Remove unregister code
Date: Tue, 18 Aug 2026 21:57:12 +0800	[thread overview]
Message-ID: <4a0b20e5-947c-45a4-8fcf-89c77e0a4cfb@gmail.com> (raw)
In-Reply-To: <aoRXk0H1muF_gZJP@x1.local>


On 2026/8/18 21:01, Peter Xu wrote:
> On Tue, Aug 18, 2026 at 07:57:06PM +0800, Yanfei Xu wrote:
>> Hi Peter,
> Hi, Yanfei,
>
>> 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 for taking a look.  This is a valid question to ask.
>
> Though it was there for 13 years without being "enhanced", it means the
> possibility we leverage it in the next couple of years is low.
>
> You also discussed the other side of things: I am not a frequent RDMA user,
> but my understanding is frequent MR reg operations already slow down
> migration quite a bit.  It means dynamic management including unregisters
> will be even worse.  AFAICT, it'll be a challenging task if we want to keep
> the performance in bar and add a hard throttle to pinned memory.

One advantage of non-pin-all is that it neither sends the all-zero chunk
nor registers the corresponding MRs. For guests with a low dirty-page
workload and a large number of zero pages, this lets it migrate faster
than pin-all and pin less guest memory during the migration.

>
> Obviously, RDMA migration users care a bunch on performance.
>
> So I see no good reason to not drop it.  Even if someone will work out that
> problem, it's still not much code to add, and it'll likely be easier we
> design it from scratch with the demand, and without worry of breaking
> anyone.

Got it, thanks for the explanation.

Regards,
Yanfei

>
> When that happens (if it ever will..), someone should also send an update
> to MAINTAINER file on RDMA migration to change it out of Odd Fixes stage..
>
> Thanks,
>


  reply	other threads:[~2026-08-18 13:57 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-17 20:24 [PATCH 00/10] migration/rdma: Fixes or drops Peter Xu
2026-08-17 20:24 ` [PATCH 01/10] migration/rdma: Introduce RDMA_CONTROL_NUM Peter Xu
2026-08-19 10:35   ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 02/10] migration/rdma: Remove unregister code Peter Xu
2026-08-18 11:57   ` Yanfei Xu
2026-08-18 13:01     ` Peter Xu
2026-08-18 13:57       ` Yanfei Xu [this message]
2026-08-18 14:43         ` Peter Xu
2026-08-19  3:55           ` Yanfei Xu
2026-08-19 10:52   ` Jinpu Wang
2026-08-19 12:01     ` Jinpu Wang
2026-08-19 12:47       ` Peter Xu
2026-08-19 13:20         ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 03/10] migration/rdma: Stick with rdma_ prefix for all tracepoints Peter Xu
2026-08-19 11:39   ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 04/10] migration/rdma: Drop RDMALocalBlock.is_ram_block Peter Xu
2026-08-19 12:43   ` Jinpu Wang
2026-08-19 14:49     ` Peter Xu
2026-08-17 20:24 ` [PATCH 05/10] migration/rdma: Drop RDMALocalBlock.unregister_bitmap Peter Xu
2026-08-19 12:44   ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 06/10] migration/rdma: Drop RDMARegister.key.chunk Peter Xu
2026-08-19 12:48   ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 07/10] migration/rdma: Sanity check RDMA_CONTROL_REGISTER_REQUEST on buflen Peter Xu
2026-08-19 12:52   ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 08/10] migration/rdma: Sanity check RDMA_CONTROL_REGISTER_REQUEST chunks Peter Xu
2026-08-19 13:00   ` Jinpu Wang
2026-08-19 15:20     ` Peter Xu
2026-08-19 17:29       ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 09/10] migration/rdma: Sanity check upper bound of register MR address Peter Xu
2026-08-19 13:09   ` Jinpu Wang
2026-08-17 20:24 ` [PATCH 10/10] migration/rdma: Sanity check compress request ranges Peter Xu
2026-08-19 13:10   ` Jinpu Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a0b20e5-947c-45a4-8fcf-89c77e0a4cfb@gmail.com \
    --to=isyanfei.xu@gmail.com \
    --cc=farosas@suse.de \
    --cc=guoqing.zhang@amd.com \
    --cc=jinpu.wang@ionos.com \
    --cc=jmarcin@redhat.com \
    --cc=lizhijian@fujitsu.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=yanfei.xu@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.