diff options
author | Peter Xu <peterx@redhat.com> | 2022-10-11 17:55:53 -0400 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2022-12-15 10:30:37 +0100 |
commit | 61717ea9d21c8701f312b647a8ea092c5dfbf8e4 (patch) | |
tree | d7d008eab05fb76dac1d33f10827c4e8a767fffe /stubs | |
parent | d9e474ea564bc109bc6fc81323ae90a7c9e7f04f (diff) | |
download | qemu-61717ea9d21c8701f312b647a8ea092c5dfbf8e4.zip qemu-61717ea9d21c8701f312b647a8ea092c5dfbf8e4.tar.gz qemu-61717ea9d21c8701f312b647a8ea092c5dfbf8e4.tar.bz2 |
migration: Introduce pss_channel
Introduce pss_channel for PageSearchStatus, define it as "the migration
channel to be used to transfer this host page".
We used to have rs->f, which is a mirror to MigrationState.to_dst_file.
After postcopy preempt initial version, rs->f can be dynamically changed
depending on which channel we want to use.
But that later work still doesn't grant full concurrency of sending pages
in e.g. different threads, because rs->f can either be the PRECOPY channel
or POSTCOPY channel. This needs to be per-thread too.
PageSearchStatus is actually a good piece of struct which we can leverage
if we want to have multiple threads sending pages. Sending a single guest
page may not make sense, so we make the granule to be "host page", and in
the PSS structure we allow specify a QEMUFile* to migrate a specific host
page. Then we open the possibility to specify different channels in
different threads with different PSS structures.
The PSS prefix can be slightly misleading here because e.g. for the
upcoming usage of postcopy channel/thread it's not "searching" (or,
scanning) at all but sending the explicit page that was requested. However
since PSS existed for some years keep it as-is until someone complains.
This patch mostly (simply) replace rs->f with pss->pss_channel only. No
functional change intended for this patch yet. But it does prepare to
finally drop rs->f, and make ram_save_guest_page() thread safe.
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Diffstat (limited to 'stubs')
0 files changed, 0 insertions, 0 deletions