qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: "Wang, Wei W" <wei.w.wang@intel.com>
Cc: "Wang, Lei4" <lei4.wang@intel.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"quintela@redhat.com" <quintela@redhat.com>,
	"peterx@redhat.com" <peterx@redhat.com>,
	"leobras@redhat.com" <leobras@redhat.com>
Subject: Re: [PATCH] multifd: Set a higher "backlog" default value for listen()
Date: Thu, 18 May 2023 13:29:46 +0100	[thread overview]
Message-ID: <ZGYaOu3F3hsiPj5N@redhat.com> (raw)
In-Reply-To: <DS0PR11MB6373D659BCA67BD75D8ECC5DDC7F9@DS0PR11MB6373.namprd11.prod.outlook.com>

On Thu, May 18, 2023 at 09:13:58AM +0000, Wang, Wei W wrote:
> On Thursday, May 18, 2023 4:52 PM, Wang, Lei4 wrote:
> > When destination VM is launched, the "backlog" parameter for listen() is set
> > to 1 as default in socket_start_incoming_migration_internal(), which will
> > lead to socket connection error (the queue of pending connections is full)
> > when "multifd" and "multifd-channels" are set later on and a high number of
> > channels are used. Set it to a hard-coded higher default value 512 to fix this
> > issue.
> > 
> > Reported-by: Wei Wang <wei.w.wang@intel.com>
> > Signed-off-by: Lei Wang <lei4.wang@intel.com>
> > ---
> >  migration/socket.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/migration/socket.c b/migration/socket.c index
> > 1b6f5baefb..b43a66ef7e 100644
> > --- a/migration/socket.c
> > +++ b/migration/socket.c
> > @@ -179,7 +179,7 @@
> > socket_start_incoming_migration_internal(SocketAddress *saddr,
> >      QIONetListener *listener = qio_net_listener_new();
> >      MigrationIncomingState *mis = migration_incoming_get_current();
> >      size_t i;
> > -    int num = 1;
> > +    int num = 512;
> > 
> 
> Probably we need a macro for it, e.g.
> #define MIGRATION_CHANNEL_MAX  512
> 
> Also, I think below lines could be removed, as using a larger value of num (i.e. 512)
> doesn't seem to consume more resources anywhere:
> -    if (migrate_use_multifd()) {
> -        num = migrate_multifd_channels();
> -    } else if (migrate_postcopy_preempt()) {
> -        num = RAM_CHANNEL_MAX;
> -    }

Given that this code already exists, why is it not already sufficient ?

The commit description is saying we're setting backlog == 1 wit
multifd, but this later code is setting it to match the multfd
channels.  Why isn't that enough ?

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2023-05-18 12:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-18  8:52 [PATCH] multifd: Set a higher "backlog" default value for listen() Lei Wang
2023-05-18  9:13 ` Wang, Wei W
2023-05-18 11:44   ` Juan Quintela
2023-05-18 12:29   ` Daniel P. Berrangé [this message]
2023-05-18 12:42     ` Juan Quintela
2023-05-18 15:17       ` Wang, Wei W
2023-05-18 15:28         ` Juan Quintela
2023-05-18  9:16 ` Juan Quintela
2023-05-19  1:30   ` Wang, Lei
2023-05-19  2:44     ` Wang, Wei W
2023-05-19  2:51       ` Wang, Lei
2023-05-19  3:33         ` Wang, Wei W
2023-05-19 11:32           ` Juan Quintela
2023-05-19 11:22       ` Juan Quintela
2023-05-19 15:17         ` Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZGYaOu3F3hsiPj5N@redhat.com \
    --to=berrange@redhat.com \
    --cc=lei4.wang@intel.com \
    --cc=leobras@redhat.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=wei.w.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).