Bug 2138176

Summary: [RFE] Postcopy Preemption (libvirt)
Product: Red Hat Enterprise Linux 9 Reporter: Peter Xu <peterx>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
libvirt sub component: Live Migration QA Contact: Fangge Jin <fjin>
Status: NEW --- Docs Contact:
Severity: medium    
Priority: unspecified CC: alexander.lougovski, djdumas, jdenemar, jsuchane, lcheng, leobras, lmen, mdean, nilal, peterx, quintela, virt-maint
Version: 9.3Keywords: FutureFeature, Triaged
Target Milestone: rcFlags: peterx: needinfo? (jdenemar)
Target Release: 9.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2046606    
Bug Blocks:    

Description Peter Xu 2022-10-27 13:49:40 UTC
This bug is used to track libvirt support on postcopy preemption.

There's one new capability called "postcopy-preempt" supported for QEMU migration to speedup postcopy page request latencies.  To enable it, one can simply enable the capability before starting the migration for postcopy.  It does not need other special parameters.  The only limitation is it only works with protocol that supports multiple channels (similar to multi-fd in this case).

Comment 2 Jiri Denemark 2022-10-31 10:01:17 UTC
Peter is there any downside of this feature or can we just enable it
automatically without an explicit request from a user? I guess we could
enabled it whenever postcopy and multi-fd are enabled...

And should it be enabled on both sides of migration or just one of them?

Comment 3 Peter Xu 2022-10-31 14:00:01 UTC
(In reply to Jiri Denemark from comment #2)
> Peter is there any downside of this feature or can we just enable it
> automatically without an explicit request from a user? I guess we could
> enabled it whenever postcopy and multi-fd are enabled...

Postcopy and multifd are not yet compatible, afaict, so the new preempt mode is not compatible with multifd as well.  However yeah if any VM that can enable multifd should also be able to enable preempt when with postcopy, and it should always benefit postcopy, iiuc.

Currently one downside of preempt is we haven't gone though enough test, e.g., one known issue is multi channels can cause wrong ordered connections, similar to the multifd bug here:

https://bugzilla.redhat.com/show_bug.cgi?id=2137740

I'll need to further look into it, but hopefully shouldn't affect the long term plan of having it by default.

> 
> And should it be enabled on both sides of migration or just one of them?

Both sides.

Thanks!

Comment 7 Peter Xu 2023-06-30 16:47:25 UTC
Jiri, any updates for this one?  Thanks,