virtio: console: Don't block entire guest if host doesn't read data

2010-10-19 Thread Rusty Russell
From: Amit Shah If the host is slow in reading data or doesn't read data at all, blocking write calls not only blocked the program that called write() but the entire guest itself. To overcome this, let's not block till the host signals it has given back the virtio ring element we passed it. Ins

Re: [PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-19 Thread Hans de Goede
Hi, On 10/19/2010 09:32 AM, Amit Shah wrote: > On (Tue) Oct 19 2010 [09:23:00], Hans de Goede wrote: 3) This patch will cause processes filling the virtqueue fast enough to block to never wake up again, due to a missing waitqueue wakeup, see: https://bugzilla.redhat.co

Re: [PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-19 Thread Amit Shah
On (Tue) Oct 19 2010 [09:23:00], Hans de Goede wrote: > >>3) This patch will cause processes filling the virtqueue fast enough to > >>block > >>to never wake up again, due to a missing waitqueue wakeup, see: > >>https://bugzilla.redhat.com/show_bug.cgi?id=643750 > > > >Doesn't happen in my

Re: [PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-19 Thread Hans de Goede
Hi, On 10/19/2010 09:10 AM, Amit Shah wrote: > On (Tue) Oct 19 2010 [08:55:16], Hans de Goede wrote: >> Hi, >> >> On 10/19/2010 07:45 AM, Amit Shah wrote: >>> If the host is slow in reading data or doesn't read data at all, >>> blocking write calls not only blocked the program that called write()

Re: [PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-19 Thread Amit Shah
On (Tue) Oct 19 2010 [08:57:43], Hans de Goede wrote: > Hi, > > Ok replying to my own reply, because I misread the code. > > On 10/19/2010 08:55 AM, Hans de Goede wrote: > >Hi, > > > >On 10/19/2010 07:45 AM, Amit Shah wrote: > >>If the host is slow in reading data or doesn't read data at all, > >

Re: [PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-19 Thread Amit Shah
On (Tue) Oct 19 2010 [08:55:16], Hans de Goede wrote: > Hi, > > On 10/19/2010 07:45 AM, Amit Shah wrote: > >If the host is slow in reading data or doesn't read data at all, > >blocking write calls not only blocked the program that called write() > >but the entire guest itself. > > > >To overcome t

Re: [PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-18 Thread Hans de Goede
Hi, Ok replying to my own reply, because I misread the code. On 10/19/2010 08:55 AM, Hans de Goede wrote: > Hi, > > On 10/19/2010 07:45 AM, Amit Shah wrote: >> If the host is slow in reading data or doesn't read data at all, >> blocking write calls not only blocked the program that called write()

Re: [PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-18 Thread Hans de Goede
Hi, On 10/19/2010 07:45 AM, Amit Shah wrote: > If the host is slow in reading data or doesn't read data at all, > blocking write calls not only blocked the program that called write() > but the entire guest itself. > > To overcome this, let's not block till the host signals it has given > back the

[PATCH] virtio: console: Don't block entire guest if host doesn't read data

2010-10-18 Thread Amit Shah
If the host is slow in reading data or doesn't read data at all, blocking write calls not only blocked the program that called write() but the entire guest itself. To overcome this, let's not block till the host signals it has given back the virtio ring element we passed it. Instead, send the buf