On 01/23/2015 08:59 AM, Dr. David Alan Gilbert wrote: > * Eric Blake (eblake@redhat.com) wrote: >> On 01/23/2015 06:48 AM, Dr. David Alan Gilbert wrote: >>> * Liang Li (liang.z.li@intel.com) wrote: >>>> Add the qmp and hmp commands to tune the parameters used in live >>>> migration. >>> >>> If I understand correctly on the destination side we need to set the number of >>> decompression threads very early on an incoming migration - I'm not >>> clear how early that needs to be - especially if you're using fd: so it's >>> not waiting for a connect ? >>> >>> Eric: How would libvirt do that? >> >> Libvirt does some handshaking before starting migration. The source >> would advertise that "I'm capable of threaded migration; and plan to use >> X send and Y receive threads"; the destination would either reply that >> threads are unsupported or set the receive thread count at that point, >> then the source would know if it can enable threads and set the send >> thread count, before letting migration start. I don't see any problems >> with the current design of starting things up. > > Patch 3 calls migrate_decompress_threads_create from process_incoming_migration_co, > if you're using fd based incoming migration then I think that gets called > before libvirt would have a chance to connect to the monitor and > call the parameter setting to say how many threads it wants. > (A tcp incoming migration wouldn't have that problem because it > waits until the TCP accept before calling process_incoming_migration_co) Then it probably needs to be exposed through a command-line parameter, so that -incoming gains the ability to specify parameters as part of starting up qemu. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org