[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [Qemu-block] [PATCH v3 03/13] l2tpv3: Drop l2tpv3_can_s
Re: [Qemu-devel] [Qemu-block] [PATCH v3 03/13] l2tpv3: Drop l2tpv3_can_send
Tue, 19 May 2015 15:48:30 +0100
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.
> 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).
Description: PGP signature
[Qemu-devel] [PATCH v3 01/13] stubs: Add qemu_set_fd_handler, Fam Zheng, 2015/05/18
[Qemu-devel] [PATCH v3 05/13] net/socket: Drop net_socket_can_send, Fam Zheng, 2015/05/18
[Qemu-devel] [PATCH v3 09/13] alsaaudio: Remove unused error handling of qemu_set_fd_handler, Fam Zheng, 2015/05/18