[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues |
Date: |
Fri, 08 Jun 2018 10:18:25 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) |
Stefan Hajnoczi <address@hidden> writes:
> On Fri, Jun 08, 2018 at 12:42:35PM +0800, Peter Xu wrote:
>> On Thu, Jun 07, 2018 at 01:53:01PM +0200, Markus Armbruster wrote:
>> > Peter Xu <address@hidden> writes:
>> >
>> > > Previously we cleanup the queues when we got CLOSED event. It was used
>> >
>> > we clean up
>> >
>> > > to make sure we won't leftover replies/events of a old client to a new
>> >
>> > we won't send leftover replies/events of an old client
>> >
>> > > client. Now this patch postpones that until OPENED.
>> >
>> > What if OPENED never comes?
>>
>> Then we clean that up until destruction of the monitor. IMHO it's
>> fine, but I'm not sure whether that's an overall acceptable approach.
>
> I think this patch fixes the problem at the wrong level. Marc-André's
> fix seemed like a cleaner solution.
Is it the right solution?
I proposed another one:
[...]
>> > Here's what I think we should do on such EOF:
>> >
>> > 1. Shut down input
>> >
>> > Stop reading input. If input has its own file descriptor (as opposed
>> > to a read/write fd shared with output), close it.
>> >
>> > 2. Flush output
>> >
>> > Continue to write output until the queue becomes empty or we run into
>> > an error (such as EPIPE, telling us the output's consumer went away).
>> > Works exactly as before, except we proceed to step 3 when the queue
exactly as before EOF
>> > becomes empty.
>> >
>> > 3. Shut down output
>> >
>> > Close the output file descriptor.
- [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Peter Xu, 2018/06/04
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Marc-André Lureau, 2018/06/04
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Markus Armbruster, 2018/06/07
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Peter Xu, 2018/06/08
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Markus Armbruster, 2018/06/08
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Stefan Hajnoczi, 2018/06/08
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Peter Xu, 2018/06/08
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Peter Xu, 2018/06/08
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Markus Armbruster, 2018/06/11
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Stefan Hajnoczi, 2018/06/11
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Peter Xu, 2018/06/12
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Stefan Hajnoczi, 2018/06/13
- Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues, Peter Xu, 2018/06/13