From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 07E455A004F for ; Fri, 26 Jul 2024 14:37:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1721997440; bh=aNwQ4FH9Jlw1gNjj+lrfYi4J8g32N3sR73ezXqj1kbA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=DpQCnjaGBEpC/MHpA2PaHcvA7Q1rBSgolGiyEie51swSZ3/yE/8o1FtDtl/Ci6aeZ Xd3t4+h4h/e30+LFFiIPbotB7TaQtlVIBULSlwAcGeu65kAp9aZ2joDsSLmn4BM1oX pGr0jrF/9CuFpcDuwWiajCPya7muijVBQmi1jNhpqLQRH3IgME72BS0hmK5+vtpgzY exQaULRy7m4c8BiWSFYRHFOobb8akvBU/fV1oY+uh0v8Tn8XaSP09hXMOOD4FruMZH V2bfDQhXyQP4iVhTJqYzNqmwcOwGD+BRAX66S0tDAtaz3e5YMBev27OzLIhoCialf5 cx9yjnZBWn1iQ== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4WVnMN0JYcz4x6p; Fri, 26 Jul 2024 22:37:20 +1000 (AEST) Date: Fri, 26 Jul 2024 22:12:27 +1000 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 3/5] tap: Don't use EPOLLET on Qemu sockets Message-ID: References: <20240726072031.3941305-1-david@gibson.dropbear.id.au> <20240726072031.3941305-4-david@gibson.dropbear.id.au> <20240726100056.235b65de@elisabeth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kBg91EjlYOkhuqw2" Content-Disposition: inline In-Reply-To: <20240726100056.235b65de@elisabeth> Message-ID-Hash: PSN4QLS3T5VGXIZRU3M7MGA2KVEZ463D X-Message-ID-Hash: PSN4QLS3T5VGXIZRU3M7MGA2KVEZ463D 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 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: --kBg91EjlYOkhuqw2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jul 26, 2024 at 10:00:56AM +0200, Stefano Brivio wrote: > On Fri, 26 Jul 2024 17:20:29 +1000 > David Gibson wrote: >=20 > > Currently we set EPOLLET (edge trigger) on the epoll flags for the > > connected Qemu Unix socket. It's not clear that there's a reason for > > doing this: for TCP sockets we need to use EPOLLET, because we leave da= ta > > in the socket buffers for our flow control handling. That consideration > > doesn't apply to the way we handle the qemu socket however. >=20 > It significantly decreases epoll_wait() overhead on sustained data > transfers, because we can read multiple TAP_BUF_SIZE buffers at a time > instead of just one. That's a reason to keep the loop, but not EPOLLET itself, AFAICT. I'd be happy enough to put the loop back in as an optimization (although, I'd prefer to avoid the goto). > I can check that now again with current QEMU and kernel versions, plus > several fundamental changes in buffer handling, but I don't see a real > reason why this shouldn't have changed meanwhile. --=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 --kBg91EjlYOkhuqw2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmajkpwACgkQzQJF27ox 2GfLIQ/9HOFXFAbvhtXfhaf2mp4UBlYz2ZUZoFEa2NXybD9i+qfPfpsLP7F7hBp2 fPlsXVt5C1cvewSvFOuUmDL3njrlyWC+3l8JWIQJxDccaewXs+/hJF4Jt754MdYI r/VsgbPjR3nTfpJ5N0kxynD1pX0s75Cn/uM2gcnllR8IPPSEwLfqPZS+aCB06WCH Ar9N0z1MBe+CU2xkE372jA3o1WXcltbE056WLF9fWVP/WQTRZA05lrHONnZ5oeGj LJvjoBc3XQQjbRdBgL8AipHCw1yMUkLkYbObWOQjz/2/DOdcQrPOmK+IFvJWh6UD bAJyjjHIOjTLRnsUl1vyyCdHs+Ufbz1NIgNOJE5IV6XLNsG1/ks/WE83majU3SN8 TgiZX27g2U2Sup2c2PYiUXrgwOLEnzceKJxotWLzLPWvIkAqcQv2R5rpQaEyCeOY onRA51LlUBPdpvy/tv/mX91g0kqLjZH9BuSO+WxZfgMT4CtK40A1DYbpeXCdZK1F bG79dmdURBAio2Bk7nyu3Q1h5oTk8On0IJWogo9bwGtDxHh6lS7qT7eClkqjjnLq XpF6zjb5M7ucPfWErDAlvLwV83Ri0RWqC2eCua+YWWDL+dUB+M3U3bkyvu3qSBMc axO6Mm3D0XMj/wQXtemlZ5PwvwvAenNma4sddZ2M1ACzXmhg0Bc= =Bgnf -----END PGP SIGNATURE----- --kBg91EjlYOkhuqw2--