aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/qapi/source.py
diff options
context:
space:
mode:
authorPeter Xu <peterx@redhat.com>2024-02-02 18:28:52 +0800
committerPeter Xu <peterx@redhat.com>2024-02-05 14:42:10 +0800
commitf88f86c4ee3fe673b34873e27af2de0a16fe01fd (patch)
tree0263f733f10b4263f29cf84ba288e46cc0a7fcd5 /scripts/qapi/source.py
parentmigration/multifd: Change retval of multifd_send_pages() (diff)
downloadqemu-f88f86c4ee3fe673b34873e27af2de0a16fe01fd.tar.xz
qemu-f88f86c4ee3fe673b34873e27af2de0a16fe01fd.zip
migration/multifd: Rewrite multifd_queue_page()
The current multifd_queue_page() is not easy to read and follow. It is not good with a few reasons: - No helper at all to show what exactly does a condition mean; in short, readability is low. - Rely on pages->ramblock being cleared to detect an empty queue. It's slightly an overload of the ramblock pointer, per Fabiano [1], which I also agree. - Contains a self recursion, even if not necessary.. Rewrite this function. We add some comments to make it even clearer on what it does. [1] https://lore.kernel.org/r/87wmrpjzew.fsf@suse.de Reviewed-by: Fabiano Rosas <farosas@suse.de> Link: https://lore.kernel.org/r/20240202102857.110210-19-peterx@redhat.com Signed-off-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'scripts/qapi/source.py')
0 files changed, 0 insertions, 0 deletions