qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler


From: klim
Subject: Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler
Date: Thu, 18 Jan 2018 12:47:11 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 01/18/2018 12:44 PM, Paolo Bonzini wrote:
On 18/01/2018 10:41, klim wrote:
I propose to install a separate pullhup watcher regardless of
whether the device waits for data or not. After closing the connection,
the guest has a capability to read the data within timeout.
I don't understand the timeout part.
The timeout is important, because of following situation:
client sends to the guest big bunch of data and closes his end of socket.
if we just destroy the connection on the qemu's side, the guest can't
read remaining data in channel.
(which can be much more than guest's buffer), although he would do it
later.
For this case timeout after POLLHUP is added. It is set after receiving
POLLHUP and reset after each reading.
But why would one second be enough?
One second was merely a suggestion. Maybe 10 seconds would be better.

Paolo





reply via email to

[Prev in Thread] Current Thread [Next in Thread]