Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-13 Thread Peter Xu
On Wed, Jun 13, 2018 at 03:30:05PM +0100, Stefan Hajnoczi wrote: > On Tue, Jun 12, 2018 at 01:47:00PM +0800, Peter Xu wrote: > > On Mon, Jun 11, 2018 at 05:45:49PM +0100, Stefan Hajnoczi wrote: > > > On Fri, Jun 08, 2018 at 10:18:25AM +0200, Markus Armbruster wrote: > > > > Stefan Hajnoczi writes:

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-13 Thread Stefan Hajnoczi
On Tue, Jun 12, 2018 at 01:47:00PM +0800, Peter Xu wrote: > On Mon, Jun 11, 2018 at 05:45:49PM +0100, Stefan Hajnoczi wrote: > > On Fri, Jun 08, 2018 at 10:18:25AM +0200, Markus Armbruster wrote: > > > Stefan Hajnoczi writes: > > > > On Fri, Jun 08, 2018 at 12:42:35PM +0800, Peter Xu wrote: > > >

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-11 Thread Peter Xu
On Mon, Jun 11, 2018 at 05:45:49PM +0100, Stefan Hajnoczi wrote: > On Fri, Jun 08, 2018 at 10:18:25AM +0200, Markus Armbruster wrote: > > Stefan Hajnoczi 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

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-11 Thread Stefan Hajnoczi
On Fri, Jun 08, 2018 at 10:18:25AM +0200, Markus Armbruster wrote: > Stefan Hajnoczi 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 writes: > >> > > >> > > Previously we cleanup the que

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-11 Thread Markus Armbruster
Peter Xu writes: > On Fri, Jun 08, 2018 at 05:11:54PM +0800, Peter Xu wrote: [...] > So I think I agree with Markus's solution, we just flush the response > queue when we get CLOSED (but we don't close the output fd; IMHO > that's chardev backend's job). Would that work? I figure you're right o

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Peter Xu
On Fri, Jun 08, 2018 at 05:11:54PM +0800, Peter Xu wrote: [...] > Frankly speaking I think this might be an ideal fix as well. For > example what if we are executing the dispatcher of a command when we > received the CLOSED event? If so, the dispatcher will put the > response onto the response

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Peter Xu
On Fri, Jun 08, 2018 at 10:18:25AM +0200, Markus Armbruster wrote: > Stefan Hajnoczi 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 writes: > >> > > >> > > Previously we cleanup the

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Markus Armbruster
Stefan Hajnoczi 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 writes: >> > >> > > Previously we cleanup the queues when we got CLOSED event. It was used >> > >> > we clean up >> > >> > >

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Stefan Hajnoczi
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 writes: > > > > > Previously we cleanup the queues when we got CLOSED event. It was used > > > > we clean up > > > > > to make sure we won't leftover repl

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-08 Thread Markus Armbruster
Peter Xu writes: > On Thu, Jun 07, 2018 at 01:53:01PM +0200, Markus Armbruster wrote: >> Peter Xu 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

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-07 Thread Peter Xu
On Thu, Jun 07, 2018 at 01:53:01PM +0200, Markus Armbruster wrote: > Peter Xu 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/ev

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-07 Thread Markus Armbruster
Peter Xu 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 i

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-04 Thread Peter Xu
On Mon, Jun 04, 2018 at 05:01:21PM +0200, Marc-André Lureau wrote: > Hi > > On Mon, Jun 4, 2018 at 10:06 AM, Peter Xu wrote: > > Previously we cleanup the queues when we got CLOSED event. It was used > > to make sure we won't leftover replies/events of a old client to a new > > client. Now this

Re: [Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-04 Thread Marc-André Lureau
Hi On Mon, Jun 4, 2018 at 10:06 AM, Peter Xu wrote: > Previously we cleanup the queues when we got CLOSED event. It was used > to make sure we won't leftover replies/events of a old client to a new > client. Now this patch postpones that until OPENED. > > In most cases, it does not really matte

[Qemu-devel] [PATCH] monitor: postpone monitor_qmp_cleanup_queues

2018-06-04 Thread Peter Xu
Previously we cleanup the queues when we got CLOSED event. It was used to make sure we won't leftover replies/events of a old client to a new client. Now this patch postpones that until OPENED. In most cases, it does not really matter much since either way will make sure that the new client won'