Received: from eggs.gnu.org ([2001:4830:134:3::10]:45103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuj2c-0001mH-7U for qemu-devel@nongnu.org; Tue, 19 May 2015 11:02:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yuj2Y-000306-7h for qemu-devel@nongnu.org; Tue, 19 May 2015 11:02:46 -0400 Date: Tue, 19 May 2015 16:02:38 +0100 From: Stefan Hajnoczi Message-ID: <20150519150238.GK9338@stefanha-thinkpad.redhat.com> References: <1432032670-15124-1-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="EMQjp+MvU6EBGjHc" Content-Disposition: inline In-Reply-To: <1432032670-15124-1-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 00/13] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Fam Zheng Cc: qemu-block@nongnu.org, Juan Quintela , Jason Wang , qemu-devel@nongnu.org, Vincenzo Maffione , "Vassili Karpov (malc)" , Gerd Hoffmann , Stefan Hajnoczi , Amit Shah , Paolo Bonzini , Giuseppe Lettieri , Luigi Rizzo --EMQjp+MvU6EBGjHc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 19, 2015 at 10:50:57AM +0000, Fam Zheng wrote: > v3: Replace previous 13 with a simple return type conversion patch. > Drop RFC. >=20 > This carries out the mandate in the comment of qemu_set_fd_handler2 and r= emoves > fd_read_poll from the code base, because it will make the work easier to > convert ppoll to epoll in main loop. Also, the aio interface doesn't hav= e a > read poll callback, which means this conversion woule be necessary if we = want > to move iohandler fds from main loop to AioContext. >=20 > There are five users of the read poll callback now: qemu-nbd, l2tpv3, net= map, > socket and tap, which are all covered. >=20 > Patch 1 adds a stub for qemu_set_fd_handler which will be referenced in c= oming > patches. >=20 > Patch 2 converts qemu-nbd which compares two global numbers in the fd_rea= d_poll > callback. >=20 > Patches 3~6 converts the four net devices, all of which checks > qemu_can_send_packet() in the callback. >=20 > Patch 7 and 8 finally removes the function. >=20 > The rest patches are cleanup for the unuseful return value of > qemu_set_fd_handler. >=20 > Please review! I looked at the first few patches. The qemu-nbd.c conversion is good. It finds locations where read_poll state transitions happen and updates file descriptor monitoring there. The l2tpv3 and netmap conversion throws away read_poll and introduces problems instead. Please look at the patches again and either: 1. Convert everything like you converted qemu-nbd.c. This is a conservative approach and we can be confident that behavior is unchanged. 2. Convert more carefully, making sure that packets are actually dropped and QEMU does not spin on a readable fd. I prefer #1 because it's easier to check that behavior is still correct. It also minimizes queuing inside QEMU. Stefan --EMQjp+MvU6EBGjHc Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVW1COAAoJEJykq7OBq3PIKXMH/i/11w1ZXTzbT7PfCuTBw5BF 4GOUoMQORahw6bys6wPhfSRLxjTE8NG24aOkZHVnXflh8+lihk5UY0FQNB0O4PIh vgcz9Io16QMlXAPI6iuxiP1Om4JjVx5PYlTcAfJ7fy8pMAzina0HlKeIGSX6Tqcy DdLMPghDOGNU/j9FHzY26HP1/n1pLFJqxamKjcrjbB6UnBIxSZ+rndsjkB74eXhX etji/nOzwOfm8c9tIOmw1VMb4zTMbdMsS5FRSpEdTjf5FeXCGvIUMbKD5tHo15z+ cvdMyN30qmzu2fDcWxVBz/umWkBHi2vrLE2oiZXQCa4mtGULoNVEZlqex6CNFio= =RAZi -----END PGP SIGNATURE----- --EMQjp+MvU6EBGjHc--