Re: [RFC] kvm tools: Implement multiple VQ for virtio-net

2011-11-15 Thread Michael S. Tsirkin
On Wed, Nov 16, 2011 at 10:34:42AM +1030, Rusty Russell wrote: > On Mon, 14 Nov 2011 15:05:07 +0200, "Michael S. Tsirkin" > wrote: > > On Mon, Nov 14, 2011 at 02:25:17PM +0200, Pekka Enberg wrote: > > > On Mon, Nov 14, 2011 at 4:04 AM, Asias He wrote: > > > > Why both the bandwidth and latency p

Re: [PATCHv2 RFC] virtio-spec: flexible configuration layout

2011-11-15 Thread Michael S. Tsirkin
On Wed, Nov 16, 2011 at 10:28:52AM +1030, Rusty Russell wrote: > On Fri, 11 Nov 2011 09:39:13 +0200, Sasha Levin > wrote: > > On Fri, Nov 11, 2011 at 6:24 AM, Rusty Russell > > wrote: > > > (2) There's no huge win in keeping the same layout.  Let's make some > > >    cleanups.  There are more u

Re: [PATCH 5 of 5] virtio: expose added descriptors immediately

2011-11-15 Thread Michael S. Tsirkin
On Wed, Nov 16, 2011 at 10:51:26AM +1030, Rusty Russell wrote: > On Mon, 14 Nov 2011 08:56:06 +0200, "Michael S. Tsirkin" > wrote: > > On Sun, Nov 13, 2011 at 11:03:13PM +0200, Michael S. Tsirkin wrote: > > > On Thu, Nov 03, 2011 at 06:12:53PM +1030, Rusty Russell wrote: > > > > A virtio driver d

Re: [PATCHv2 RFC] virtio-spec: flexible configuration layout

2011-11-15 Thread Michael S. Tsirkin
On Wed, Nov 16, 2011 at 10:28:05AM +1030, Rusty Russell wrote: > On Sun, 13 Nov 2011 17:14:27 +0200, "Michael S. Tsirkin" > wrote: > > On Fri, Nov 11, 2011 at 02:54:31PM +1030, Rusty Russell wrote: > > > Indeed, I'd like to see two changes to your proposal: > > > > > > (1) It should be all or no

Re: [RFC] kvm tools: Implement multiple VQ for virtio-net

2011-11-15 Thread jason wang
On 11/15/2011 12:44 PM, Krishna Kumar2 wrote: > Sasha Levin wrote on 11/14/2011 03:45:40 PM: > >>> Why both the bandwidth and latency performance are dropping so >>> dramatically with multiple VQ? >> It looks like theres no hash sync between host and guest, which makes >> the RX VQ change for ever

Re: [PATCH 5 of 5] virtio: expose added descriptors immediately

2011-11-15 Thread Rusty Russell
On Mon, 14 Nov 2011 08:56:06 +0200, "Michael S. Tsirkin" wrote: > On Sun, Nov 13, 2011 at 11:03:13PM +0200, Michael S. Tsirkin wrote: > > On Thu, Nov 03, 2011 at 06:12:53PM +1030, Rusty Russell wrote: > > > A virtio driver does virtqueue_add_buf() multiple times before finally > > > calling virtq

Re: [PATCH] virtio-mmio: Devices parameter parsing

2011-11-15 Thread Rusty Russell
On Tue, 15 Nov 2011 13:53:05 +, Pawel Moll wrote: > +static char *virtio_mmio_cmdline_devices; > +module_param_named(devices, virtio_mmio_cmdline_devices, charp, 0); This is the wrong way to do this. Don't put things in a charp and process it later. It's lazy. You should write parsers for

Re: [PATCH] virtio-mmio: Correct the name of the guest features selector

2011-11-15 Thread Rusty Russell
On Tue, 15 Nov 2011 14:25:22 +, Pawel Moll wrote: > On Tue, 2011-11-15 at 14:17 +, Sasha Levin wrote: > > Guest features selector spelling mistake. > > > > diff --git a/include/linux/virtio_mmio.h b/include/linux/virtio_mmio.h > > index 27c7ede..5c7b6f0 100644 > > --- a/include/linux/virti

Re: [PATCHv2 RFC] virtio-spec: flexible configuration layout

2011-11-15 Thread Rusty Russell
On Fri, 11 Nov 2011 09:39:13 +0200, Sasha Levin wrote: > On Fri, Nov 11, 2011 at 6:24 AM, Rusty Russell wrote: > > (2) There's no huge win in keeping the same layout.  Let's make some > >    cleanups.  There are more users ahead of us then behind us (I > >    hope!). > > Actually, if we already

Re: [PATCHv2 RFC] virtio-spec: flexible configuration layout

2011-11-15 Thread Rusty Russell
On Sun, 13 Nov 2011 17:14:27 +0200, "Michael S. Tsirkin" wrote: > On Fri, Nov 11, 2011 at 02:54:31PM +1030, Rusty Russell wrote: > > Indeed, I'd like to see two changes to your proposal: > > > > (1) It should be all or nothing. If a driver can find the virtio header > > capability, it shoul

Re: [RFC] kvm tools: Implement multiple VQ for virtio-net

2011-11-15 Thread Rusty Russell
On Mon, 14 Nov 2011 15:05:07 +0200, "Michael S. Tsirkin" wrote: > On Mon, Nov 14, 2011 at 02:25:17PM +0200, Pekka Enberg wrote: > > On Mon, Nov 14, 2011 at 4:04 AM, Asias He wrote: > > > Why both the bandwidth and latency performance are dropping so > > > dramatically > > > with multiple VQ? >

Re: [RFC] kvm tools: Add support for virtio-mmio

2011-11-15 Thread Peter Maydell
On 15 November 2011 16:47, Sasha Levin wrote: > +       vmmio->hdr = (struct virtio_mmio_hdr) { > +               .magic          = {'v', 'i', 'r', 't'}, > +               .version        = 1, > +               .device_id      = device_id - 0x1000 + 1, > +               .vendor_id      = PCI_VENDO

Re: [RFC] kvm tools: Add support for virtio-mmio

2011-11-15 Thread Sasha Levin
On Tue, 2011-11-15 at 20:18 +0200, Avi Kivity wrote: > On 11/15/2011 08:13 PM, Sasha Levin wrote: > > > > > > > > Hmm... If thats the plan, it should probably be a virtio thing (not > > > > virtio-mmio specific). > > > > > > > > Either way, it could also use some clarification in the spec. > > >

Re: [RFC] kvm tools: Add support for virtio-mmio

2011-11-15 Thread Avi Kivity
On 11/15/2011 08:13 PM, Sasha Levin wrote: > > > > > > Hmm... If thats the plan, it should probably be a virtio thing (not > > > virtio-mmio specific). > > > > > > Either way, it could also use some clarification in the spec. > > > > The spec only covers virtio-pci; this virtio-mmio is completel

Re: [RFC] kvm tools: Add support for virtio-mmio

2011-11-15 Thread Sasha Levin
On Tue, 2011-11-15 at 20:14 +0200, Avi Kivity wrote: > On 11/15/2011 07:56 PM, Sasha Levin wrote: > > > > > > This isn't a PCI device, so does it make sense to use a PCI vendor > > > ID here? The kernel doesn't check the vendor ID at the moment, > > > but presumably the idea of the field is to all

Re: [RFC] kvm tools: Add support for virtio-mmio

2011-11-15 Thread Avi Kivity
On 11/15/2011 07:56 PM, Sasha Levin wrote: > > > > This isn't a PCI device, so does it make sense to use a PCI vendor > > ID here? The kernel doesn't check the vendor ID at the moment, > > but presumably the idea of the field is to allow the kernel to > > work around implementation bugs/blacklist/

Re: [RFC] kvm tools: Add support for virtio-mmio

2011-11-15 Thread Sasha Levin
On Tue, 2011-11-15 at 17:00 +, Peter Maydell wrote: > On 15 November 2011 16:47, Sasha Levin wrote: > > + vmmio->hdr = (struct virtio_mmio_hdr) { > > + .magic = {'v', 'i', 'r', 't'}, > > + .version= 1, > > + .device_id = dev

[RFC] kvm tools: Add support for virtio-mmio

2011-11-15 Thread Sasha Levin
This patch adds support for the new virtio-mmio transport layer added in 3.2-rc1. The purpose of this new layer is to allow virtio to work on systems which don't necessarily support PCI, such as embedded systems. To apply the patch on top of the KVM tools tree, you must first pull Linus' tree on

Re: [PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-11-15 Thread Amit Shah
On (Tue) 15 Nov 2011 [16:36:20], Michael S. Tsirkin wrote: > On Tue, Nov 15, 2011 at 08:01:49PM +0530, Amit Shah wrote: > > On (Tue) 15 Nov 2011 [16:23:00], Michael S. Tsirkin wrote: > > > On Tue, Nov 15, 2011 at 07:33:46PM +0530, Amit Shah wrote: > > > > On (Tue) 15 Nov 2011 [14:51:27], Michael S.

Re: [RFC] kvm tools: Implement multiple VQ for virtio-net

2011-11-15 Thread Sasha Levin
On Tue, 2011-11-15 at 10:14 +0530, Krishna Kumar2 wrote: > Sasha Levin wrote on 11/14/2011 03:45:40 PM: > > > > Why both the bandwidth and latency performance are dropping so > > > dramatically with multiple VQ? > > > > It looks like theres no hash sync between host and guest, which makes > > the

Re: [PATCH] virtio-mmio: Correct the name of the guest features selector

2011-11-15 Thread Pawel Moll
On Tue, 2011-11-15 at 14:17 +, Sasha Levin wrote: > Guest features selector spelling mistake. > > diff --git a/include/linux/virtio_mmio.h b/include/linux/virtio_mmio.h > index 27c7ede..5c7b6f0 100644 > --- a/include/linux/virtio_mmio.h > +++ b/include/linux/virtio_mmio.h > @@ -63,7 +63,7 @@ >

[PATCH] virtio-mmio: Devices parameter parsing

2011-11-15 Thread Pawel Moll
This patch adds an option to instantiate guest virtio-mmio devices basing on a kernel command line (or module) parameter, for example: virtio_mmio.devices=0x100@0x100b:48,1K@0x1001e000:74 Signed-off-by: Pawel Moll --- drivers/virtio/Kconfig | 25 ++ drivers/virtio/virtio

Re: [PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2011 at 08:01:49PM +0530, Amit Shah wrote: > On (Tue) 15 Nov 2011 [16:23:00], Michael S. Tsirkin wrote: > > On Tue, Nov 15, 2011 at 07:33:46PM +0530, Amit Shah wrote: > > > On (Tue) 15 Nov 2011 [14:51:27], Michael S. Tsirkin wrote: > > > > On Tue, Nov 15, 2011 at 05:59:36PM +0530, A

Re: [PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-11-15 Thread Amit Shah
On (Tue) 15 Nov 2011 [16:23:00], Michael S. Tsirkin wrote: > On Tue, Nov 15, 2011 at 07:33:46PM +0530, Amit Shah wrote: > > On (Tue) 15 Nov 2011 [14:51:27], Michael S. Tsirkin wrote: > > > On Tue, Nov 15, 2011 at 05:59:36PM +0530, Amit Shah wrote: > > > > On (Sun) 02 Oct 2011 [11:33:26], Michael S.

Re: [PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2011 at 07:33:46PM +0530, Amit Shah wrote: > On (Tue) 15 Nov 2011 [14:51:27], Michael S. Tsirkin wrote: > > On Tue, Nov 15, 2011 at 05:59:36PM +0530, Amit Shah wrote: > > > On (Sun) 02 Oct 2011 [11:33:26], Michael S. Tsirkin wrote: > > > > On Thu, Sep 29, 2011 at 09:19:40PM +0530, A

[PATCH] virtio-mmio: Correct the name of the guest features selector

2011-11-15 Thread Sasha Levin
Guest features selector spelling mistake. Cc: Pawel Moll Cc: Rusty Russell Cc: virtualization@lists.linux-foundation.org Signed-off-by: Sasha Levin --- Hopefully not too late to fix, should possibly be done in one of the next RCs since it's user facing. include/linux/virtio_mmio.h |2 +-

Re: [PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-11-15 Thread Amit Shah
On (Tue) 15 Nov 2011 [14:51:27], Michael S. Tsirkin wrote: > On Tue, Nov 15, 2011 at 05:59:36PM +0530, Amit Shah wrote: > > On (Sun) 02 Oct 2011 [11:33:26], Michael S. Tsirkin wrote: > > > On Thu, Sep 29, 2011 at 09:19:40PM +0530, Amit Shah wrote: > > > > Remove all the vqs on hibernation and re-cr

Re: [RFC 0/5] virtio-pci,kvm tools: Support new virtio-pci spec in kvm tools

2011-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2011 at 01:43:12AM +0200, Sasha Levin wrote: > This patch series contains two fixes for the RFC patch send by Michael. These > patches are pretty basic and should probably be merged into the next version > of that patch. Yes, will do, thanks! > Other two patches add support to the

Re: [PATCH 00/11] virtio: Support for hibernation (S4)

2011-11-15 Thread Amit Shah
On (Tue) 04 Oct 2011 [10:36:05], Rusty Russell wrote: > On Sun, 2 Oct 2011 11:49:21 +0200, "Michael S. Tsirkin" > wrote: > > On Thu, Sep 29, 2011 at 08:55:56PM +0530, Amit Shah wrote: > > > Hello, > > > > > > These patches add support for S4 to virtio (pci) and all drivers. The > > > patches ar

Re: [PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-11-15 Thread Michael S. Tsirkin
On Tue, Nov 15, 2011 at 05:59:36PM +0530, Amit Shah wrote: > On (Sun) 02 Oct 2011 [11:33:26], Michael S. Tsirkin wrote: > > On Thu, Sep 29, 2011 at 09:19:40PM +0530, Amit Shah wrote: > > > Remove all the vqs on hibernation and re-create them after restoring > > > from a hibernated image. This keep

Re: [PATCH v2 09/11] virtio: net: Add freeze, restore handlers to support S4

2011-11-15 Thread Amit Shah
On (Sun) 02 Oct 2011 [11:33:26], Michael S. Tsirkin wrote: > On Thu, Sep 29, 2011 at 09:19:40PM +0530, Amit Shah wrote: > > Remove all the vqs on hibernation and re-create them after restoring > > from a hibernated image. This keeps networking working across > > hibernation. > > > > Signed-off-by