On Tuesday, May 30, 2023 10:41 PM, Peter Xu wrote: > On Tue, May 30, 2023 at 05:02:59PM +0800, Wei Wang wrote: > > The Postcopy preempt capability requires to be set before incoming > > starts, so change the postcopy tests to start with deferred incoming > > and call migrate-incoming after the cap has been set. > > > > Signed-off-by: Wei Wang <wei.w.w...@intel.com> > > Hmm.. so we used to do socket_start_incoming_migration_internal() before > setting the right num for the preempt test, then I'm curious why it wasn't > failing before this patch when trying to connect with the preempt channel.. > > Wei, do you know?
I think there are two reasons: #1 "backlog" specifies the number of pending connections. As long as the server accepts the connections faster than the clients side connecting, connection will succeed. For the preempt test, it uses only 2 channels, so very likely to not have pending connections. (This is easier to trigger for the multifd case, e.g. use a much larger number like 16). #2 per my tests (on kernel 6.2), the number of pending connections allowed is actually "backlog + 1", which is 2 in this case. Adding more pending connections will then be dropped. I'm not sure if " backlog + 1" is true for older versions of kernel, though.