Re: [PATCH 0/3] virtio-net: 64 bit features, event index

2011-05-04 Thread Michael S. Tsirkin
On Thu, May 05, 2011 at 12:01:48AM +0300, Michael S. Tsirkin wrote: > OK, here's a patch that implements the virtio spec update that I > sent earlier. It supercedes the PUBLISH_USED_IDX patches > I sent out earlier. Sorry, forgot to mention this is on top of qemu-kvm d16e0f0 . Copy is here: git:

[PDFv2] virtio-spec: 64 bit features, used/avail event

2011-05-04 Thread Michael S. Tsirkin
People asked for a pdf for a new spec, so here it is: http://userweb.kernel.org/~mst/virtio-spec-event-idx-v2.pdf Guest and host implementation can be found here: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-net-next-event-idx-v1 git://git.kernel.org/pub/scm/linux/kernel/git/

[PATCH 2/3] virtio+vhost: used_event feature

2011-05-04 Thread Michael S. Tsirkin
Add support for used_event feature, and utilize it to reduce the number of interrupts for the guest. Signed-off-by: Michael S. Tsirkin --- hw/vhost_net.c |6 + hw/virtio.c| 66 ++-- hw/virtio.h|7 +- 3 files changed, 7

[PATCH 1/3] virtio/vhost: support 64 bit features

2011-05-04 Thread Michael S. Tsirkin
Add support for extended feature bits: up to 64 bit. Only virtio-pci is actually implemented, s390 and syborg are stubbed out (and untested). Signed-off-by: Michael S. Tsirkin --- hw/qdev-properties.c | 39 hw/qdev.h | 10 + hw/s390-virtio-bus.c |

[PATCH 3/3] virtio: avail_event index support

2011-05-04 Thread Michael S. Tsirkin
Reduce the number of exits utilizing the avail_event feature. Signed-off-by: Michael S. Tsirkin --- hw/vhost_net.c |6 ++ hw/virtio.c| 26 -- hw/virtio.h|7 ++- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/hw/vhost_net.c b/hw/v

[PATCH 0/3] virtio-net: 64 bit features, event index

2011-05-04 Thread Michael S. Tsirkin
OK, here's a patch that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. Support is added in both userspace and vhost-net. I see nice performance improvements: e.g. from 12 to 18 Gbit/s host to guest with netperf, but did not sp

[PATCH 18/18] virtio_net: limit xmit polling

2011-05-04 Thread Michael S. Tsirkin
Current code might introduce a lot of latency variation if there are many pending bufs at the time we attempt to transmit a new one. This is bad for real-time applications and can't be good for TCP either. Free up just enough to both clean up all buffers eventually and to be able to xmit the next

[PATCH 16/18] virtio_ring: Add capacity check API

2011-05-04 Thread Michael S. Tsirkin
>From: Shirley Ma Signed-off-by: Shirley Ma Signed-off-by: Michael S. Tsirkin --- I'm not sure who wrote this first anymore :) But it's a simple patch. drivers/virtio/virtio_ring.c |8 include/linux/virtio.h |5 + 2 files changed, 13 insertions(+), 0 deletions(-)

[PATCH 17/18] virtio_net: fix TX capacity checks using new API

2011-05-04 Thread Michael S. Tsirkin
virtio net uses the number of sg entries to check for TX ring capacity freed. But this gives incorrect results when indirect buffers are used. Use the new capacity API instead. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c |9 - 1 files changed, 4 insertions(+), 5 de

[PATCH 15/18] virtio_net: delay TX callbacks

2011-05-04 Thread Michael S. Tsirkin
Ask for delayed callbacks on TX ring full, to give the other side more of a chance to make progress. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index

[PATCH 11/18] vhost: support avail_event idx

2011-05-04 Thread Michael S. Tsirkin
Add support for the new avail_event feature in vhost_net and vhost test modules. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 12 drivers/vhost/test.c |6 ++-- drivers/vhost/vhost.c | 65 + drivers/vhost/vhost.h |

[PATCH 14/18] virtio: add api for delayed callbacks

2011-05-04 Thread Michael S. Tsirkin
Add an API that tells the other side that callbacks should be delayed until a lot of work has been done. Implement using the new used_event feature. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 27 +++ include/linux/virtio.h |9

[PATCH 13/18] virtio_test: avail_event index support

2011-05-04 Thread Michael S. Tsirkin
Add ability to test the new avail_event feature, enable by default. Signed-off-by: Michael S. Tsirkin --- tools/virtio/virtio_test.c | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 157ec68..8a

[PATCH 09/18] virtio: use avail_event index

2011-05-04 Thread Michael S. Tsirkin
Use the new avail_event feature to reduce the number of exits from the guest. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/

[PATCH 10/18] vhost: utilize used_event index

2011-05-04 Thread Michael S. Tsirkin
Support the new used_event index. When acked, utilize it to reduce the # of interrupts sent to the guest. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 74 + drivers/vhost/vhost.h |7 2 files changed, 63 insertions(+), 18

[PATCH 12/18] virtio_test: support used_event index

2011-05-04 Thread Michael S. Tsirkin
Add ability to test the new used_event feature, enable by default. Signed-off-by: Michael S. Tsirkin --- tools/virtio/virtio_test.c | 18 -- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index 9e65e6d..15

[PATCH 08/18] virtio_ring: support for used_event idx feature

2011-05-04 Thread Michael S. Tsirkin
Add support for the used_event idx feature: when enabling interrupts, publish the current avail index value to the host so that we get interrupts on the next update. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 14 ++ 1 files changed, 14 insertions(+), 0 del

[PATCH 07/18] virtio ring: inline function to check for events

2011-05-04 Thread Michael S. Tsirkin
With the new used_event and avail_event and features, both host and guest need similar logic to check whether events are enabled, so it helps to put the common code in the header. Note that Xen has similar logic for notification hold-off in include/xen/interface/io/ring.h with req_event and req_pr

[PATCH 04/18] virtio: don't delay avail index update

2011-05-04 Thread Michael S. Tsirkin
Update avail index immediately instead of upon kick: for virtio-net RX this helps parallelism with the host. Signed-off-by: Michael S. Tsirkin --- drivers/virtio/virtio_ring.c | 15 +-- 1 files changed, 5 insertions(+), 10 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/d

[PATCH 06/18] virtio_ring: avail event index interface

2011-05-04 Thread Michael S. Tsirkin
Define a new feature bit for the host to declare that it uses an avail_event index (like Xen) instead of a feature bit to enable/disable interrupts. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_ring.h | 11 --- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git

[PATCH 01/18] virtio: 64 bit features

2011-05-04 Thread Michael S. Tsirkin
Extend features to 64 bit so we can use more transport bits. Signed-off-by: Michael S. Tsirkin --- drivers/lguest/lguest_device.c |8 drivers/s390/kvm/kvm_virtio.c |8 drivers/virtio/virtio.c|8 drivers/virtio/virtio_pci.c| 34 +++

[PATCH 05/18] virtio: used event index interface

2011-05-04 Thread Michael S. Tsirkin
Define a new feature bit for the guest to utilize a used_event index (like Xen) instead if a flag bit to enable/disable interrupts. Signed-off-by: Michael S. Tsirkin --- include/linux/virtio_ring.h |9 + 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/include/linux/vir

[PATCH 02/18] virtio_test: update for 64 bit features

2011-05-04 Thread Michael S. Tsirkin
Extend the virtio_test tool so it can work with 64 bit features. Signed-off-by: Michael S. Tsirkin --- tools/virtio/virtio_test.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/virtio/virtio_test.c b/tools/virtio/virtio_test.c index df0c6d2..9e65e6d 100644

[PATCH 03/18] vhost: fix 64 bit features

2011-05-04 Thread Michael S. Tsirkin
Update vhost_has_feature to make it work correctly for bit > 32. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.h |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h index b3363ae..0f1bf33 100644 --- a/drivers/v

[PATCH 00/18] virtio and vhost-net performance enhancements

2011-05-04 Thread Michael S. Tsirkin
OK, here's a large patchset that implements the virtio spec update that I sent earlier. It supercedes the PUBLISH_USED_IDX patches I sent out earlier. I know it's a lot to ask but please test, and please consider for 2.6.40 :) I see nice performance improvements: one run showed going from 12 to 1

[PATCHv2] virtio-spec: 64 bit features, used/avail event

2011-05-04 Thread Michael S. Tsirkin
I'm working on a patchset (to follow shortly) that modified the notificatin hand-off in virtio to be basically like Xen: each side published an index, the other side only triggers an event when it crosses that index value (Xen event indexes start at 1, ours start at 0 for backward-compatiblity, but

Re: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread Greg KH
On Wed, May 04, 2011 at 07:54:09PM +, KY Srinivasan wrote: > > > > -Original Message- > > From: devel-boun...@linuxdriverproject.org [mailto:devel- > > boun...@linuxdriverproject.org] On Behalf Of Greg KH > > Sent: Wednesday, May 04, 2011 3:40 PM > > To: Randy Dunlap > > Cc: virtualiz

Re: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread Randy Dunlap
On Wed, 4 May 2011 12:39:54 -0700 Greg KH wrote: > On Wed, May 04, 2011 at 12:33:02PM -0700, Randy Dunlap wrote: > > On Wed, 4 May 2011 11:53:38 -0700 Greg KH wrote: > > > > > On Wed, May 04, 2011 at 01:44:27PM -0500, H Hartley Sweeten wrote: > > > > On Wednesday, May 04, 2011 11:52 AM, K. Y. Sri

RE: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread KY Srinivasan
> -Original Message- > From: devel-boun...@linuxdriverproject.org [mailto:devel- > boun...@linuxdriverproject.org] On Behalf Of Greg KH > Sent: Wednesday, May 04, 2011 3:40 PM > To: Randy Dunlap > Cc: virtualizat...@lists.osdl.org; de...@linuxdriverproject.org; H Hartley > Sweeten; Haiyan

Re: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread Greg KH
On Wed, May 04, 2011 at 12:33:02PM -0700, Randy Dunlap wrote: > On Wed, 4 May 2011 11:53:38 -0700 Greg KH wrote: > > > On Wed, May 04, 2011 at 01:44:27PM -0500, H Hartley Sweeten wrote: > > > On Wednesday, May 04, 2011 11:52 AM, K. Y. Srinivasan wrote: > > > > > > > > The vmbus driver dependes on

Re: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread Randy Dunlap
On Wed, 4 May 2011 11:53:38 -0700 Greg KH wrote: > On Wed, May 04, 2011 at 01:44:27PM -0500, H Hartley Sweeten wrote: > > On Wednesday, May 04, 2011 11:52 AM, K. Y. Srinivasan wrote: > > > > > > The vmbus driver dependes on ACPI and PCI subsystems. Change > > > Kconfig to reflect this. > > > > >

[PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread K. Y. Srinivasan
The vmbus driver dependes on ACPI and PCI subsystems. Change Kconfig to reflect this. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang --- drivers/staging/hv/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/hv/Kconfig b/drivers/stagin

Re: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread Greg KH
On Wed, May 04, 2011 at 02:51:42PM -0400, Christoph Hellwig wrote: > On Wed, May 04, 2011 at 11:51:45AM -0700, K. Y. Srinivasan wrote: > > config HYPERV > > tristate "Microsoft Hyper-V client drivers" > > - depends on X86 && m > > + depends on X86 && ACPI && PCI && m > > I can't see anyth

Re: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread Greg KH
On Wed, May 04, 2011 at 01:44:27PM -0500, H Hartley Sweeten wrote: > On Wednesday, May 04, 2011 11:52 AM, K. Y. Srinivasan wrote: > > > > The vmbus driver dependes on ACPI and PCI subsystems. Change > > Kconfig to reflect this. > > > > Signed-off-by: K. Y. Srinivasan > > Signed-off-by: Haiyang Zh

Re: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread Christoph Hellwig
On Wed, May 04, 2011 at 11:51:45AM -0700, K. Y. Srinivasan wrote: > config HYPERV > tristate "Microsoft Hyper-V client drivers" > - depends on X86 && m > + depends on X86 && ACPI && PCI && m I can't see anything preventing this driver from beeing built-in, so the "depends on m" shou

RE: [PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread KY Srinivasan
> -Original Message- > From: H Hartley Sweeten [mailto:hartl...@visionengravers.com] > Sent: Wednesday, May 04, 2011 2:44 PM > To: KY Srinivasan; gre...@suse.de; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; virtualizat...@lists.osdl.org > Cc: Haiyang Zhang > Subject: RE:

[PATCH 1/1] Staging: hv: Add the necessary dependencies to hyperv Kconfig

2011-05-04 Thread K. Y. Srinivasan
The vmbus driver dependes on ACPI and PCI subsystems. Change Kconfig to reflect this. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang --- drivers/staging/hv/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/hv/Kconfig b/drivers/stagi

Re: various vmbus review comments

2011-05-04 Thread Greg KH
On Wed, May 04, 2011 at 04:58:39PM +, KY Srinivasan wrote: > > > 2) hyperv_storage.h - this has all the definitions needed to build storage > > > drivers for Hyper-V. Storage drivers will include hyperv.h and > > > hyperv_storage.h. > > > > > > 3) hyperv_net.h - this has all the definitions nee

RE: various vmbus review comments

2011-05-04 Thread KY Srinivasan
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Wednesday, May 04, 2011 12:32 PM > To: KY Srinivasan > Cc: gre...@suse.de; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; virtualizat...@lists.osdl.org > Subject: Re: various vmbus review comments > > On

Re: various vmbus review comments

2011-05-04 Thread Greg KH
On Wed, May 04, 2011 at 04:20:11PM +, KY Srinivasan wrote: > > > > -Original Message- > > From: Greg KH [mailto:g...@kroah.com] > > Sent: Tuesday, May 03, 2011 4:47 PM > > To: KY Srinivasan > > Cc: gre...@suse.de; linux-ker...@vger.kernel.org; > > de...@linuxdriverproject.org; virtual

RE: various vmbus review comments

2011-05-04 Thread KY Srinivasan
> -Original Message- > From: Greg KH [mailto:g...@kroah.com] > Sent: Tuesday, May 03, 2011 4:47 PM > To: KY Srinivasan > Cc: gre...@suse.de; linux-ker...@vger.kernel.org; > de...@linuxdriverproject.org; virtualizat...@lists.osdl.org > Subject: various vmbus review comments > > I just too