Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path

2011-05-08 Thread Pekka Enberg
On Sun, 2011-05-08 at 21:09 +0800, Asias He wrote:
 As virtio spec says:
 
 
  Because this is high importance and low bandwidth, the current Linux
  implementation polls for the buffer to be used, rather than waiting
  for an interrupt, simplifying the implementation signicantly.
 
 
 drivers/char/virtio_console.c
  send_buf() {
  ...
   /* Tell Host to go! */
   virtqueue_kick(out_vq);
  ...
 while (!virtqueue_get_buf(out_vq, len))
 cpu_relax();
  ...
  }
 
 The console hangs can simply be reproduced by yes command which
 gives tremendous console IOs and IRQs.

Sasha, does this fix the hangs you were seeing? We should re-enable
virtio console unconditionally if this does - that increases test
coverage for virtio console.

Pekka

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path

2011-05-08 Thread Sasha Levin
On Sun, 2011-05-08 at 20:05 +0300, Pekka Enberg wrote:
 On Sun, 2011-05-08 at 21:09 +0800, Asias He wrote:
  As virtio spec says:
  
  
   Because this is high importance and low bandwidth, the current Linux
   implementation polls for the buffer to be used, rather than waiting
   for an interrupt, simplifying the implementation signicantly.
  
  
  drivers/char/virtio_console.c
   send_buf() {
   ...
  /* Tell Host to go! */
  virtqueue_kick(out_vq);
   ...
  while (!virtqueue_get_buf(out_vq, len))
  cpu_relax();
   ...
   }
  
  The console hangs can simply be reproduced by yes command which
  gives tremendous console IOs and IRQs.
 
 Sasha, does this fix the hangs you were seeing? We should re-enable
 virtio console unconditionally if this does - that increases test
 coverage for virtio console.

I'm seeing no more hangs, but why enable it unconditionally?
Maybe enable it by default, but we shouldn't force the activation of
virtio modules if the user doesn't want them.

-- 

Sasha.

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path

2011-05-08 Thread Pekka Enberg
On Sun, May 8, 2011 at 8:21 PM, Sasha Levin levinsasha...@gmail.com wrote:
 I'm seeing no more hangs, but why enable it unconditionally?
 Maybe enable it by default, but we shouldn't force the activation of
 virtio modules if the user doesn't want them.

I meant enabling the device on PCI bus like we did before.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path

2011-05-08 Thread Sasha Levin
On Sun, 2011-05-08 at 20:28 +0300, Pekka Enberg wrote:
 On Sun, May 8, 2011 at 8:21 PM, Sasha Levin levinsasha...@gmail.com wrote:
  I'm seeing no more hangs, but why enable it unconditionally?
  Maybe enable it by default, but we shouldn't force the activation of
  virtio modules if the user doesn't want them.
 
 I meant enabling the device on PCI bus like we did before.

Thats what I've meant too. virtio-console is the only device which got
initialized even if it wasn't requested (even when '-c serial' was
passed specifically).

-- 

Sasha.

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path

2011-05-08 Thread Pekka Enberg
On Sun, May 8, 2011 at 8:29 PM, Sasha Levin levinsasha...@gmail.com wrote:
 On Sun, 2011-05-08 at 20:28 +0300, Pekka Enberg wrote:
 On Sun, May 8, 2011 at 8:21 PM, Sasha Levin levinsasha...@gmail.com wrote:
  I'm seeing no more hangs, but why enable it unconditionally?
  Maybe enable it by default, but we shouldn't force the activation of
  virtio modules if the user doesn't want them.

 I meant enabling the device on PCI bus like we did before.

 Thats what I've meant too. virtio-console is the only device which got
 initialized even if it wasn't requested (even when '-c serial' was
 passed specifically).

The more options we have, the more combinations we need to test.
What's the downside of enabling virtio console by default? The upside
is that it's less likely to break. Btw, we should probably do that for
virtio rng as well.
--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path

2011-05-08 Thread Sasha Levin
On Sun, 2011-05-08 at 20:34 +0300, Pekka Enberg wrote:
 On Sun, May 8, 2011 at 8:29 PM, Sasha Levin levinsasha...@gmail.com wrote:
  On Sun, 2011-05-08 at 20:28 +0300, Pekka Enberg wrote:
  On Sun, May 8, 2011 at 8:21 PM, Sasha Levin levinsasha...@gmail.com 
  wrote:
   I'm seeing no more hangs, but why enable it unconditionally?
   Maybe enable it by default, but we shouldn't force the activation of
   virtio modules if the user doesn't want them.
 
  I meant enabling the device on PCI bus like we did before.
 
  Thats what I've meant too. virtio-console is the only device which got
  initialized even if it wasn't requested (even when '-c serial' was
  passed specifically).
 
 The more options we have, the more combinations we need to test.
 What's the downside of enabling virtio console by default? The upside
 is that it's less likely to break. Btw, we should probably do that for
 virtio rng as well.

I fully support enabling it by default, I'm against enabling it even if
the user asked to have it disabled.

-- 

Sasha.

--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 4/4] kvm tools: Fix virtio console hangs by removing IRQ injection for tx path

2011-05-08 Thread Pekka Enberg
On Sun, 2011-05-08 at 20:35 +0300, Sasha Levin wrote:
 I fully support enabling it by default, I'm against enabling it even if
 the user asked to have it disabled.

Sure.


--
To unsubscribe from this list: send the line unsubscribe kvm in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html