linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
@ 2012-11-08  9:17 Amit Shah
  2012-11-16  0:52 ` Rusty Russell
  0 siblings, 1 reply; 8+ messages in thread
From: Amit Shah @ 2012-11-08  9:17 UTC (permalink / raw)
  To: Rusty Russell
  Cc: sjur, Michael S. Tsirkin, linus.walleij, masami.hiramatsu.pt,
	ohad, linux-kernel, virtualization, Sjur Brændeland,
	Amit Shah

From: Sjur Brændeland <sjur.brandeland@stericsson.com>

Remove buffers from the out-queue when a port is removed. Rproc_serial
communicates with remote processors that may crash and leave buffers in
the out-queue. The virtio serial ports may have buffers in the out-queue
as well, e.g. for non-blocking ports and the host didn't consume them
yet.

[Amit: Remove WARN_ON for generic ports case.]

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
 drivers/char/virtio_console.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 9ebadcb..5ff3b3e 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1521,6 +1521,10 @@ static void remove_port_data(struct port *port)
 	/* Remove buffers we queued up for the Host to send us data in. */
 	while ((buf = virtqueue_detach_unused_buf(port->in_vq)))
 		free_buf(buf, true);
+
+	/* Remove buffers we queued up for the Host to consume */
+	while ((buf = virtqueue_detach_unused_buf(port->out_vq)))
+		free_buf(buf, true);
 }
 
 /*
-- 
1.7.7.6


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
  2012-11-08  9:17 [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal Amit Shah
@ 2012-11-16  0:52 ` Rusty Russell
  2012-12-10  5:54   ` Amit Shah
  0 siblings, 1 reply; 8+ messages in thread
From: Rusty Russell @ 2012-11-16  0:52 UTC (permalink / raw)
  To: Amit Shah
  Cc: sjur, Michael S. Tsirkin, linus.walleij, masami.hiramatsu.pt,
	ohad, linux-kernel, virtualization, Sjur Brændeland,
	Amit Shah

Amit Shah <amit.shah@redhat.com> writes:
> From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>
> Remove buffers from the out-queue when a port is removed. Rproc_serial
> communicates with remote processors that may crash and leave buffers in
> the out-queue. The virtio serial ports may have buffers in the out-queue
> as well, e.g. for non-blocking ports and the host didn't consume them
> yet.
>
> [Amit: Remove WARN_ON for generic ports case.]
>
> Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> Signed-off-by: Amit Shah <amit.shah@redhat.com>

I already have this in my pending queue; I've promoted it to my
virtio-next branch now.

Thanks,
Rusty.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
  2012-11-16  0:52 ` Rusty Russell
@ 2012-12-10  5:54   ` Amit Shah
  2012-12-10 23:09     ` Rusty Russell
  0 siblings, 1 reply; 8+ messages in thread
From: Amit Shah @ 2012-12-10  5:54 UTC (permalink / raw)
  To: Rusty Russell
  Cc: sjur, Michael S. Tsirkin, linus.walleij, masami.hiramatsu.pt,
	ohad, linux-kernel, virtualization, Sjur Brændeland

On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> Amit Shah <amit.shah@redhat.com> writes:
> > From: Sjur Brændeland <sjur.brandeland@stericsson.com>
> >
> > Remove buffers from the out-queue when a port is removed. Rproc_serial
> > communicates with remote processors that may crash and leave buffers in
> > the out-queue. The virtio serial ports may have buffers in the out-queue
> > as well, e.g. for non-blocking ports and the host didn't consume them
> > yet.
> >
> > [Amit: Remove WARN_ON for generic ports case.]
> >
> > Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> 
> I already have this in my pending queue; I've promoted it to my
> virtio-next branch now.

Rusty, I still see this series in your pending queue, not in
virtio-next.  Did anything change in the meantime?

		Amit

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
  2012-12-10  5:54   ` Amit Shah
@ 2012-12-10 23:09     ` Rusty Russell
  2012-12-11  4:10       ` Amit Shah
  0 siblings, 1 reply; 8+ messages in thread
From: Rusty Russell @ 2012-12-10 23:09 UTC (permalink / raw)
  To: Amit Shah
  Cc: sjur, Michael S. Tsirkin, linus.walleij, masami.hiramatsu.pt,
	ohad, linux-kernel, virtualization, Sjur Brændeland

Amit Shah <amit.shah@redhat.com> writes:

> On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
>> Amit Shah <amit.shah@redhat.com> writes:
>> > From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>> >
>> > Remove buffers from the out-queue when a port is removed. Rproc_serial
>> > communicates with remote processors that may crash and leave buffers in
>> > the out-queue. The virtio serial ports may have buffers in the out-queue
>> > as well, e.g. for non-blocking ports and the host didn't consume them
>> > yet.
>> >
>> > [Amit: Remove WARN_ON for generic ports case.]
>> >
>> > Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
>> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
>> 
>> I already have this in my pending queue; I've promoted it to my
>> virtio-next branch now.
>
> Rusty, I still see this series in your pending queue, not in
> virtio-next.  Did anything change in the meantime?
>
> 		Amit

Hmm:

40e625ac50f40d87ddba93280d0a503425aa68e9?

Cheers,
Rusty.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
  2012-12-10 23:09     ` Rusty Russell
@ 2012-12-11  4:10       ` Amit Shah
  2012-12-12  0:01         ` Rusty Russell
  0 siblings, 1 reply; 8+ messages in thread
From: Amit Shah @ 2012-12-11  4:10 UTC (permalink / raw)
  To: Rusty Russell
  Cc: sjur, Michael S. Tsirkin, linus.walleij, masami.hiramatsu.pt,
	ohad, linux-kernel, virtualization, Sjur Brændeland

On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
> Amit Shah <amit.shah@redhat.com> writes:
> 
> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> >> Amit Shah <amit.shah@redhat.com> writes:
> >> > From: Sjur Brændeland <sjur.brandeland@stericsson.com>
> >> >
> >> > Remove buffers from the out-queue when a port is removed. Rproc_serial
> >> > communicates with remote processors that may crash and leave buffers in
> >> > the out-queue. The virtio serial ports may have buffers in the out-queue
> >> > as well, e.g. for non-blocking ports and the host didn't consume them
> >> > yet.
> >> >
> >> > [Amit: Remove WARN_ON for generic ports case.]
> >> >
> >> > Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> >> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> >> 
> >> I already have this in my pending queue; I've promoted it to my
> >> virtio-next branch now.
> >
> > Rusty, I still see this series in your pending queue, not in
> > virtio-next.  Did anything change in the meantime?
> 
> Hmm:
> 
> 40e625ac50f40d87ddba93280d0a503425aa68e9?

I'm sorry, I meant the remoteproc code, not this patch.

		Amit

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
  2012-12-11  4:10       ` Amit Shah
@ 2012-12-12  0:01         ` Rusty Russell
  2012-12-12 12:12           ` Amit Shah
  0 siblings, 1 reply; 8+ messages in thread
From: Rusty Russell @ 2012-12-12  0:01 UTC (permalink / raw)
  To: Amit Shah
  Cc: sjur, Michael S. Tsirkin, linus.walleij, masami.hiramatsu.pt,
	ohad, linux-kernel, virtualization, Sjur Brændeland

Amit Shah <amit.shah@redhat.com> writes:

> On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
>> Amit Shah <amit.shah@redhat.com> writes:
>> 
>> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
>> >> Amit Shah <amit.shah@redhat.com> writes:
>> >> > From: Sjur Brændeland <sjur.brandeland@stericsson.com>
>> >> >
>> >> > Remove buffers from the out-queue when a port is removed. Rproc_serial
>> >> > communicates with remote processors that may crash and leave buffers in
>> >> > the out-queue. The virtio serial ports may have buffers in the out-queue
>> >> > as well, e.g. for non-blocking ports and the host didn't consume them
>> >> > yet.
>> >> >
>> >> > [Amit: Remove WARN_ON for generic ports case.]
>> >> >
>> >> > Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
>> >> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
>> >> 
>> >> I already have this in my pending queue; I've promoted it to my
>> >> virtio-next branch now.
>> >
>> > Rusty, I still see this series in your pending queue, not in
>> > virtio-next.  Did anything change in the meantime?
>> 
>> Hmm:
>> 
>> 40e625ac50f40d87ddba93280d0a503425aa68e9?
>
> I'm sorry, I meant the remoteproc code, not this patch.

Still waiting for v9, AFIACT?

Sjur, we're in the merge window now, so it'd be nice to get your latest
version on top of linux-next (or simply my virtio-next git tree) today.

Thanks,
Rusty.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
  2012-12-12  0:01         ` Rusty Russell
@ 2012-12-12 12:12           ` Amit Shah
  2012-12-12 12:31             ` Sjur BRENDELAND
  0 siblings, 1 reply; 8+ messages in thread
From: Amit Shah @ 2012-12-12 12:12 UTC (permalink / raw)
  To: Rusty Russell
  Cc: Michael S. Tsirkin, sjur, linus.walleij, linux-kernel,
	virtualization, masami.hiramatsu.pt, Sjur Brændeland

On (Wed) 12 Dec 2012 [10:31:04], Rusty Russell wrote:
> Amit Shah <amit.shah@redhat.com> writes:
> 
> > On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
> >> Amit Shah <amit.shah@redhat.com> writes:
> >> 
> >> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> >> >> Amit Shah <amit.shah@redhat.com> writes:
> >> >> > From: Sjur Brændeland <sjur.brandeland@stericsson.com>
> >> >> >
> >> >> > Remove buffers from the out-queue when a port is removed. Rproc_serial
> >> >> > communicates with remote processors that may crash and leave buffers in
> >> >> > the out-queue. The virtio serial ports may have buffers in the out-queue
> >> >> > as well, e.g. for non-blocking ports and the host didn't consume them
> >> >> > yet.
> >> >> >
> >> >> > [Amit: Remove WARN_ON for generic ports case.]
> >> >> >
> >> >> > Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
> >> >> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> >> >> 
> >> >> I already have this in my pending queue; I've promoted it to my
> >> >> virtio-next branch now.
> >> >
> >> > Rusty, I still see this series in your pending queue, not in
> >> > virtio-next.  Did anything change in the meantime?
> >> 
> >> Hmm:
> >> 
> >> 40e625ac50f40d87ddba93280d0a503425aa68e9?
> >
> > I'm sorry, I meant the remoteproc code, not this patch.
> 
> Still waiting for v9, AFIACT?

Instead of sending all patches marked v9, just this patch was
re-spun.  I think you can just pick up patches 1 and 2 from v8 (they
have my acked-by), and patch 3 was an earlier version of this one,
which should just be dropped.

		Amit

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal
  2012-12-12 12:12           ` Amit Shah
@ 2012-12-12 12:31             ` Sjur BRENDELAND
  0 siblings, 0 replies; 8+ messages in thread
From: Sjur BRENDELAND @ 2012-12-12 12:31 UTC (permalink / raw)
  To: Amit Shah, Rusty Russell
  Cc: Michael S. Tsirkin, sjur@brendeland.net, linus.walleij@linaro.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	masami.hiramatsu.pt@hitachi.com

> Amit Shah [mailto:amit.shah@redhat.com] writes:
> On (Wed) 12 Dec 2012 [10:31:04], Rusty Russell wrote:
> > Amit Shah <amit.shah@redhat.com> writes:
> > > On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote:
> > >> Amit Shah <amit.shah@redhat.com> writes:
> > >> > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote:
> > >> >> Amit Shah <amit.shah@redhat.com> writes:
> > >> >> > From: Sjur Brændeland <sjur.brandeland@stericsson.com>
> > >> >> >
> > >> >> > Remove buffers from the out-queue when a port is removed.
> Rproc_serial
> > >> >> > communicates with remote processors that may crash and leave
> buffers in
> > >> >> > the out-queue. The virtio serial ports may have buffers in the out-
> queue
> > >> >> > as well, e.g. for non-blocking ports and the host didn't consume
> them
> > >> >> > yet.
> > >> >> >
> > >> >> > [Amit: Remove WARN_ON for generic ports case.]
> > >> >> >
> > >> >> > Signed-off-by: Sjur Brændeland
> <sjur.brandeland@stericsson.com>
> > >> >> > Signed-off-by: Amit Shah <amit.shah@redhat.com>
> > >> >>
> > >> >> I already have this in my pending queue; I've promoted it to my
> > >> >> virtio-next branch now.
> > >> >
> > >> > Rusty, I still see this series in your pending queue, not in
> > >> > virtio-next.  Did anything change in the meantime?
> > >>
> > >> Hmm:
> > >>
> > >> 40e625ac50f40d87ddba93280d0a503425aa68e9?
> > >
> > > I'm sorry, I meant the remoteproc code, not this patch.
> >
> > Still waiting for v9, AFIACT?
> 
> Instead of sending all patches marked v9, just this patch was
> re-spun.  I think you can just pick up patches 1 and 2 from v8 (they
> have my acked-by), and patch 3 was an earlier version of this one,

Yes, that's right. V8 contained three patches, Amit did a respin of 3/3 that was applied.
(And I mistakenly thought 1/3 and 2/3 was applied as well). 

Anyway I'm resending a new patch-set with the two missing patches.
The patches are identical to the V8, but are rebased to the virtio-next branch.

Sorry for the confusion here.

Regards,
Sjur


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-12 12:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-08  9:17 [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal Amit Shah
2012-11-16  0:52 ` Rusty Russell
2012-12-10  5:54   ` Amit Shah
2012-12-10 23:09     ` Rusty Russell
2012-12-11  4:10       ` Amit Shah
2012-12-12  0:01         ` Rusty Russell
2012-12-12 12:12           ` Amit Shah
2012-12-12 12:31             ` Sjur BRENDELAND

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).