From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=Z9OCYvwN; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 2C7445A061D for ; Mon, 03 Feb 2025 10:25:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1738574694; bh=JESmRkEG1/uCxXcJ79DDpA87y9Qr8ZmTsJha/8nZzo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z9OCYvwN2enRd8I2qXP7uZhdUouL6C70dikDL5NW9f3hmJpd6sLm3/MwsaDYkjLDM pDkhDheBgZE81uULQNBE7siRBRt13DBHunPIXNH34KEnjx6f3BBsxqdJkr9h8UEPic KQ1acFEsBWA926O8k5U6k9fdV2mxwPsjJvYa81gwPkaFB6CHaF7lqvqoPPtc7wDCr4 k315rvLbvXFlH6z8oRdDbxfJe9pBgO/8TubPPP+YM0IKWCJ7y04vOV3HFswyQ4Ky6d gDc/i0+50HUDr1eyFRYyBFHepm4zwz/x3DZ09PohxjoWw23gIJ9FzoVNVAWLpHZecT qLI7If8/Sd50g== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Ymh0k2vHpz4wcw; Mon, 3 Feb 2025 20:24:54 +1100 (AEDT) Date: Mon, 3 Feb 2025 19:45:07 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH v3 14/20] migrate: Don't handle the migration channel through epoll Message-ID: References: <20250131193953.3034031-1-sbrivio@redhat.com> <20250131193953.3034031-15-sbrivio@redhat.com> <20250203063856.0d08f579@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="q1erA5DqVqLPPU9E" Content-Disposition: inline In-Reply-To: <20250203063856.0d08f579@elisabeth> Message-ID-Hash: DS2ANSDNZO56MJIEIGYOO5ESVSV2DAY7 X-Message-ID-Hash: DS2ANSDNZO56MJIEIGYOO5ESVSV2DAY7 X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --q1erA5DqVqLPPU9E Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Feb 03, 2025 at 06:38:56AM +0100, Stefano Brivio wrote: > On Mon, 3 Feb 2025 12:50:20 +1100 > David Gibson wrote: >=20 > > On Fri, Jan 31, 2025 at 08:39:47PM +0100, Stefano Brivio wrote: > > > From: David Gibson > > >=20 > > > Currently, once a migration device state fd is assigned, we wait for > > > EPOLLIN or EPOLLOUT events on it to actually perform the migration. = Change > > > it so that once a migration is requested it we complete it synchronou= sly > > > at the end of the current epoll cycle. This has several advantages: > > >=20 > > > 1. It makes it clear that everything about the migration must be de= alt > > > with at once, not split between multiple epoll events on the cha= nnel > > > 2. It ensures the migration always takes place between epoll cycles, > > > rather than, for example, between handling TCP events and their > > > deferred handling in post_handler(). > > > 3. It reduces code setting up the epoll watch on the fd. > > >=20 > > > Signed-off-by: David Gibson > > > --- > > > epoll_type.h | 2 -- > > > migrate.c | 44 +++++++++++--------------------------------- > > > migrate.h | 2 +- > > > passt.c | 6 ++---- > > > passt.h | 2 ++ > > > vu_common.c | 27 +++++++++++++++++++++++++++ > > > 6 files changed, 43 insertions(+), 40 deletions(-) > > >=20 > > > diff --git a/epoll_type.h b/epoll_type.h > > > index b981d30..7f2a121 100644 > > > --- a/epoll_type.h > > > +++ b/epoll_type.h > > > @@ -40,8 +40,6 @@ enum epoll_type { > > > EPOLL_TYPE_VHOST_CMD, > > > /* vhost-user kick event socket */ > > > EPOLL_TYPE_VHOST_KICK, > > > - /* migration device state channel */ > > > - EPOLL_TYPE_DEVICE_STATE, > > > /* TCP_REPAIR helper listening socket */ > > > EPOLL_TYPE_REPAIR_LISTEN, > > > /* TCP_REPAIR helper socket */ > > > diff --git a/migrate.c b/migrate.c > > > index fc6a043..faa7841 100644 > > > --- a/migrate.c > > > +++ b/migrate.c > > > @@ -50,7 +50,6 @@ static union migrate_header header =3D { > > > =20 > > > /* Data sections for version 1 */ > > > static struct iovec sections_v1[] =3D { > > > - { &header, sizeof(header) }, =20 > >=20 > > This hunk seems to have migrated in during rebase somehow, it wasn't > > in my original patch, and it breaks compile. >=20 > Oh, oops, yes. I did one last rebase round before posting, and I was > convinced I was just rewording messages, so I didn't even try to > rebuild, but obviously I moved some code here and there as well. >=20 > Do you prefer I post a v4 fixing this up and addressing your other > comments (and some of my open points), or should I rather wait, if > you're working on patches based on v3? It makes no difference to me. Wait, I have some patches in the queue. --=20 David Gibson (he or they) | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you, not the other way | around. http://www.ozlabs.org/~dgibson --q1erA5DqVqLPPU9E Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmegggUACgkQzQJF27ox 2GfSyxAApfKD3M4yqvc3CkHL+RntLWOEsJ50TKUM3mHonlXJuHH8UvQoTsNiOpOn 61K+PhJrI2Uxv5DHvV12vxYBt5a8B/CCsmvIJq8VvXTEYN4v0JELd1P5jgl/q0J7 FBfPG1Bq3OPvlrsGn83V1hOmD/HUKOsiWimwH5gwXYWIm8GugeDbrq/jujoMHLZ6 0v7Os1dTELd4DD6rYYzxIjdcWK861HahLIMTjHxe9GrSPW3wi4LVQlAyzaCLSiDk ik81VC0PAsQgzrua4F+2toI6M5FKlMxstX8KCy7o5eNnIv1M+cupRXGwAmfNSvuw KoXT4XUc9UfE4nknuu+QCLtQ1vgJ7SHyyUTkCzHjHf74VWlgJ5MHMDnupOcAL8aX 6vmnxiqFAvifSSiHrscFM3+ARO1JIL8v7ZHBivPzgKjiEnRO2ezL/eHSEkIbdaRL T8hO6puRbsIdChKnnRnfYQfW//5K1n+bx8F9JLJh8OVh1urrTMcSGkJe9XRb32sM /JcE525hz26nx5f5b0xAbmsF9JyNB6R4+LfqYL9nW7flokzZUi8ppQkK/PoAHics bqpyQvoYs5UUqCJUO7S9QSgsa/yDfwcmHIiXjpz5D4WlX1j2v3FwlWHooSpQXkWX rGWkmIUI1qK7rG/7ZOZQ+9EBl1fFqDZ44Au7kZRrC7QRZQXFrPA= =jVAu -----END PGP SIGNATURE----- --q1erA5DqVqLPPU9E--