[RFC] [ver3 PATCH 2/6] virtio: Move 'num_queues' to virtqueue

2011-11-11 Thread Krishna Kumar
Move queue_index from virtio_net_config to virtqueue. This is needed to figure out the queue number of the vq in the 'done' handler of the device. Signed-off-by: krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 10 +++--- include/linux/virtio.h |1 + 2 files changed, 4

[RFC] [ver3 PATCH 1/6] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE

2011-11-11 Thread Krishna Kumar
Introduce VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: krkum...@in.ibm.com --- include/linux/virtio_net.h |1 + 1 file changed, 1 insertion(+) diff -ruNp org/include/linux/virtio_net.h new/include/linux/virtio_net.h --- org/include/linux/virtio_net.h 2011-10-12 10:16:46.0 +0530 +++

[RFC] [ver3 PATCH 0/6] Implement multiqueue virtio-net

2011-11-11 Thread Krishna Kumar
This patch series resurrects the earlier multiple TX/RX queues functionality for virtio_net, and addresses the issues pointed out. It also includes an API to share irq's, f.e. amongst the TX vqs. I plan to run TCP/UDP STREAM and RR tests for local-host and local-remote, and send the results in

[RFC] [ver3 PATCH 4/6] vhost_net: vhost_net changes

2011-11-11 Thread Krishna Kumar
Changes for multiqueue vhost_net driver. Signed-off-by: krkum...@in.ibm.com --- drivers/vhost/net.c | 253 +--- drivers/vhost/vhost.c | 225 --- drivers/vhost/vhost.h | 26 +++- 3 files changed, 340 insertions(+), 164

[RFC] [ver3 PATCH 3/6] virtio_net: virtio_net driver changes

2011-11-11 Thread Krishna Kumar
Changes for multiqueue virtio_net driver. Signed-off-by: krkum...@in.ibm.com --- drivers/net/virtio_net.c | 688 --- include/linux/virtio_net.h |2 2 files changed, 481 insertions(+), 209 deletions(-) diff -ruNp org/drivers/net/virtio_net.c

[RFC] [ver3 PATCH 6/6] virtio_net: Convert virtio_net driver to use find_vqs_irq

2011-11-11 Thread Krishna Kumar
Convert virtio_net driver to use find_vqs_irq(). The TX vq's share a single irq, while the RX vq's have individual irq's. The skb_xmit_done handler also checks if any work is required. Signed-off-by: krkum...@in.ibm.com --- drivers/net/virtio_net.c | 29 ++--- 1 file

[RFC] [ver3 PATCH 5/6] virtio: Implement find_vqs_irq()

2011-11-11 Thread Krishna Kumar
Implement find_vqs_irq() to reduce number of vectors. It can be used to specify which vq's need their own irqs, and which can share irqs with other vq's. Signed-off-by: krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 108 include/linux/virtio_config.h |

Re: [RFC] [ver3 PATCH 0/6] Implement multiqueue virtio-net

2011-11-11 Thread Krishna Kumar
Sasha Levin levinsasha...@gmail.com wrote on 11/12/2011 03:32:04 AM: I'm seeing this BUG() sometimes when running it using a small patch I did for KVM tool: [1.281531] Call Trace: [1.281531] [8138a0e5] ? free_rq_sq+0x2c/0xce [1.281531] [8138bb63] ?

[PATCH 0/4] [RFC] virtio-net: Improve small packet performance

2011-05-04 Thread Krishna Kumar
74627883 (5.6) 12731.8 12119.8 (-4.8) 128 73387800 (6.2) 21331.7 21094.7 (-1.1) Summary:BW: 4.6%SD: -1.5% Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- -- To unsubscribe from this list: send

[PATCH 1/4] [RFC] netdevice: Introduce per-txq xmit_restart

2011-05-04 Thread Krishna Kumar
Add a per-txq field that can (optionally) be set by participating drivers to indicate when to restart tx. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- include/linux/netdevice.h |1 + 1 file changed, 1 insertion(+) diff -ruNp org/include/linux/netdevice.h new/include/linux

[PATCH 2/4] [RFC] virtio: Introduce new API to get free space

2011-05-04 Thread Krishna Kumar
Introduce virtqueue_get_capacity() to help bail out of transmit path early. Also remove notification when we run out of space (I am not sure if this should be under a feature bit). Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/virtio/virtio_ring.c | 13 - include

[PATCH 4/4] [RFC] sched: Changes to dequeue_skb

2011-05-04 Thread Krishna Kumar
queues, and hence the frozen/stopped check can be avoided. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- net/sched/sch_generic.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff -ruNp org/net/sched/sch_generic.c new/net/sched/sch_generic.c --- org/net/sched

[PATCH 3/4] [RFC] virtio-net: Changes to virtio-net driver

2011-05-04 Thread Krishna Kumar
that removes most error checks, does not drop packets but instead returns EBUSY if there is no space to transmit. It also sets when to restart xmits in future. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/net/virtio_net.c | 70 ++--- 1 file

Re: [PATCH 0/4] [RFC] virtio-net: Improve small packet performance

2011-05-04 Thread Krishna Kumar
Krishna Kumar2/India/IBM@IBMIN wrote on 05/04/2011 07:32:58 PM: [PATCH 0/4] [RFC] virtio-net: Improve small packet performance I found having tabs in the table made the results a little difficult to understand. Converting the same to spaces, hope it is clear this time.

[PATCH 0/4] [RFC rev2] Implement multiqueue (RX TX) virtio-net

2011-04-05 Thread Krishna Kumar
feedback. I am travelling a bit in the next few days but will respond at the earliest. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- -- 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

[PATCH 1/4] [RFC rev2] Change virtqueue structure

2011-04-05 Thread Krishna Kumar
Move queue_index from virtio_pci_vq_info to virtqueue. This allows callback handlers to figure out the queue number for the vq that needs attention. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 10 +++--- include/linux/virtio.h |1 + 2 files

[PATCH 2/4] [RFC rev2] virtio-net changes

2011-04-05 Thread Krishna Kumar
Implement mq virtio-net driver. Though struct virtio_net_config changes, it works with the old qemu since the last element is not accessed unless qemu sets VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/net/virtio_net.c | 573

[PATCH 3/4] [RFC rev2] vhost changes

2011-04-05 Thread Krishna Kumar
. The number of vhost threads is = #txqs. Threads handle more than one txq when #txqs is more than MAX_VHOST_THREADS (4). The same thread handles both RX and TX - tested with tap/bridge so far (TBD: some changes are needed in macvtap to support the same). Signed-off-by: Krishna Kumar krkum...@in.ibm.com

[PATCH 4/4] [RFC rev2] qemu changes

2011-04-05 Thread Krishna Kumar
diff -ruNp org/hw/vhost.c new/hw/vhost.c --- org/hw/vhost.c 2011-04-05 14:15:18.0 +0530 +++ new/hw/vhost.c 2011-04-05 14:15:18.0 +0530 @@ -581,7 +581,7 @@ static void vhost_virtqueue_cleanup(stru 0, virtio_queue_get_desc_size(vdev, idx)); }

[PATCH 0/3] [RFC] Implement multiqueue (RX TX) virtio-net

2011-02-27 Thread Krishna Kumar
and vhost was done without any issues. Some early TCP/UDP test results are at the bottom of this post, I plan to submit more test results in the coming days. Please review and provide feedback on what can improve. Thanks! Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- Test configuration

[PATCH 1/3] [RFC] Change virtqueue structure

2011-02-27 Thread Krishna Kumar
Move queue_index from virtio_pci_vq_info to virtqueue. This allows callback handlers to figure out the queue number for the vq that needs attention. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 10 +++--- include/linux/virtio.h |1 + 2 files

[PATCH 2/3] [RFC] Changes for MQ virtio-net

2011-02-27 Thread Krishna Kumar
-by: Krishna Kumar krkum...@in.ibm.com --- drivers/net/virtio_net.c | 543 --- include/linux/virtio_net.h |6 2 files changed, 386 insertions(+), 163 deletions(-) diff -ruNp org/include/linux/virtio_net.h new/include/linux/virtio_net.h --- org/include/linux

[PATCH 3/3] [RFC] Changes for MQ vhost

2011-02-27 Thread Krishna Kumar
in vhost_attach_cgroups* to avoid checkpatch errors. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/vhost/net.c | 295 ++-- drivers/vhost/vhost.c | 225 +++--- drivers/vhost/vhost.h | 39 - 3 files changed, 378

[v3 RFC PATCH 0/4] Implement multiqueue virtio-net

2010-10-20 Thread Krishna Kumar
-52.08 96 40.21-3.16-24.53 -39.92 -52.97 128 36.33-33.19 -43.66 -5.68-20.49 BW: 49.3%, CPU/RCPU: 15.5%,-8.2%, SD/RSD: -22.2%,-37.0% Signed-off-by: Krishna Kumar krkum...@in.ibm.com

[v3 RFC PATCH 1/4] Change virtqueue structure

2010-10-20 Thread Krishna Kumar
Move queue_index from virtio_pci_vq_info to virtqueue. This allows callback handlers to figure out the queue number for the vq that needs attention. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 10 +++--- include/linux/virtio.h |1 + 2

[v3 RFC PATCH 2/4] Changes for virtio-net

2010-10-20 Thread Krishna Kumar
-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/net/virtio_net.c | 234 ++- include/linux/virtio_net.h |6 2 files changed, 185 insertions(+), 55 deletions(-) diff -ruNp org/include/linux/virtio_net.h new.dynamic.optimize_vhost/include/linux

[v3 RFC PATCH 3/4] Changes for vhost

2010-10-20 Thread Krishna Kumar
the guest, that is recognized and handled such that vhost[0] processes both RX and TX. This can change dynamically. vhost_poll has a new element - find_vq(), which allows optimizing some code for cases where numtxqs=1 or a packet on vhost[0] needs processing. Signed-off-by: Krishna Kumar krkum

[v3 RFC PATCH 4/4] qemu changes

2010-10-20 Thread Krishna Kumar
Changes in qemu to support mq TX. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- hw/vhost.c |7 -- hw/vhost.h |2 - hw/vhost_net.c | 16 + hw/vhost_net.h |2 - hw/virtio-net.c | 53 -- hw/virtio

[v2 RFC PATCH 0/4] Implement multiqueue virtio-net

2010-09-17 Thread Krishna Kumar
. Review/feedback appreciated. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- -- 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

[v2 RFC PATCH 1/4] Change virtqueue structure

2010-09-17 Thread Krishna Kumar
Move queue_index from virtio_pci_vq_info to virtqueue. This allows callback handlers to figure out the queue number for the vq that needs attention. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 10 +++--- include/linux/virtio.h |1 + 2 files

[v2 RFC PATCH 3/4] Changes for vhost

2010-09-17 Thread Krishna Kumar
as numtxqs=1. Besides changing handle_tx to use 'vq', this patch also changes handle_rx to take vq as parameter. The mq RX patch requires this change, but till then it is consistent (and less confusing) to make the interfaces for handling rx and tx similar. Signed-off-by: Krishna Kumar krkum

[v2 RFC PATCH 2/4] Changes for virtio-net

2010-09-17 Thread Krishna Kumar
Implement mq virtio-net driver. Though struct virtio_net_config changes, it works with old qemu's since the last element is not accessed, unless qemu sets VIRTIO_NET_F_NUMTXQS. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/net/virtio_net.c | 213

[v2 RFC PATCH 4/4] qemu changes

2010-09-17 Thread Krishna Kumar
Changes in qemu to support mq TX. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- hw/vhost.c |8 ++- hw/vhost.h |2 hw/vhost_net.c | 16 +-- hw/vhost_net.h |2 hw/virtio-net.c | 97 ++ hw/virtio-net.h |2 hw

[PATCH] vhost: Fix host panic if ioctl called with wrong index

2010-05-24 Thread Krishna Kumar
From: Krishna Kumar krkum...@in.ibm.com Missed a boundary value check in vhost_set_vring. The host panics if idx == nvqs is used in ioctl commands in vhost_virtqueue_init. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/vhost/vhost.c |2 +- 1 file changed, 1 insertion(+), 1