From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuiou-00050R-QS for qemu-devel@nongnu.org; Tue, 19 May 2015 10:48:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yuior-0006P2-KP for qemu-devel@nongnu.org; Tue, 19 May 2015 10:48:36 -0400 Date: Tue, 19 May 2015 15:48:30 +0100 From: Stefan Hajnoczi Message-ID: <20150519144830.GI9338@stefanha-thinkpad.redhat.com> References: <1432032670-15124-1-git-send-email-famz@redhat.com> <1432032670-15124-4-git-send-email-famz@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6b3yLyRKT1M6kiA0" Content-Disposition: inline In-Reply-To: <1432032670-15124-4-git-send-email-famz@redhat.com> Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v3 03/13] l2tpv3: Drop l2tpv3_can_send 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 --6b3yLyRKT1M6kiA0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 19, 2015 at 10:51:00AM +0000, Fam Zheng wrote: > This callback is called by main loop before polling s->fd, if it returns > false, the fd will not be polled in this iteration. >=20 > This is redundant with checks inside read callback. After this patch, > the data will be copied from s->fd to s->msgvec when it arrives. If the > device can't receive, it will be queued to incoming_queue, and when the > device status changes, this queue will be flushed. This doesn't work because s->msgvec can fill up when qemu_can_send_packet() returns false. At that point we burn 100% CPU because the file descriptor is still being monitored. It really is necessary to stop monitoring the file descriptor until we can send again. Or the code needs to be changed to drop packets in QEMU (currently it's the host kernel where packets may be dropped). Stefan --6b3yLyRKT1M6kiA0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJVW00+AAoJEJykq7OBq3PI3ioH/064nq2D7RXqd9uFtTHYNhX7 NTNdzjaLV4Wv7g+v5BgCfK8pD01KBaZvR0e/E3DcqoRhDXIbig3byf5BrYWuCWT4 gyTAIOmT8742yjPyPDd+dli7zQXYkBSHsawZtP+j40nLiz4d5JlL8HTwIOFLsP1G kjs4vxCj3LOLqaygPngA1zFG55bxXexJ4L87G9ckZ4PtRxdr2NWwj4DqpI6HzDRJ 2RqMDssQyu4C9jnEdqam3C7zttzMDoEUTHfVO3i0jyHNxuRMy5xNAM3Qm4b9MilJ YiCEkWL2UyE5yUgjf7memMFh4xL/DpTdJI7y3z49b1D+lBuq+9gGxde2u1r9P8g= =vLhr -----END PGP SIGNATURE----- --6b3yLyRKT1M6kiA0--