Re: Unable to create more than 1 guest virtio-net device using vhost-net backend

2010-03-22 Thread Michael S. Tsirkin
On Sun, Mar 21, 2010 at 01:58:29PM +0200, Avi Kivity wrote: On 03/21/2010 01:34 PM, Michael S. Tsirkin wrote: On Sun, Mar 21, 2010 at 12:29:31PM +0200, Avi Kivity wrote: On 03/21/2010 12:15 PM, Michael S. Tsirkin wrote: Nothing easy that I can see. Each device needs 2

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface. The driver has three memory regions. The first memory region is for device registers for sending interrupts. The second BAR is for receiving

Re: [PATCH v3 0/2] Inter-VM shared memory PCI device

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:04:54AM +0200, Avi Kivity wrote: Again, I recommend Rusty's virtio-pci for inspiration. Not just inspiration, how about building on virtio-pci? -- MST -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:40:09AM +0200, Avi Kivity wrote: On 03/25/2010 11:15 AM, Michael S. Tsirkin wrote: - Why are you using 32 bit long memory accesses for interrupts? 16 bit IO eould be enough and it's faster. This what virtio-pci does. Why is 16 bit io faster? Something

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:58:30AM +0200, Avi Kivity wrote: On 03/25/2010 11:44 AM, Michael S. Tsirkin wrote: On Thu, Mar 25, 2010 at 11:40:09AM +0200, Avi Kivity wrote: On 03/25/2010 11:15 AM, Michael S. Tsirkin wrote: - Why are you using 32 bit long memory accesses for interrupts

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 11:23:05AM -0500, Anthony Liguori wrote: On 03/25/2010 11:18 AM, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:15 AM, Michael S. Tsirkinm...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 10:30:42AM -0600, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:05 AM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Mar 25, 2010 at 12:09:36AM -0600, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 06:36:02PM +0200, Avi Kivity wrote: On 03/25/2010 11:05 AM, Michael S. Tsirkin wrote: +static struct pci_device_id ivshmem_pci_ids[] __devinitdata = { +{ +.vendor =0x1af4, +.device =0x1110, vendor ids must be registered with PCI SIG

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 06:32:15PM +0200, Avi Kivity wrote: On 03/25/2010 06:23 PM, Anthony Liguori wrote: There has been previous discussion of virtio, however while virtio is good for exporting guest memory, it's not ideal for importing memory into a guest. virtio is a DMA-based API which

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-25 Thread Michael S. Tsirkin
On Thu, Mar 25, 2010 at 10:24:20AM -0600, Cam Macdonell wrote: On Thu, Mar 25, 2010 at 3:46 AM, Avi Kivity a...@redhat.com wrote: On 03/25/2010 08:09 AM, Cam Macdonell wrote: This patch adds a driver for my shared memory PCI device using the uio_pci interface.  The driver has three memory

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-28 Thread Michael S. Tsirkin
On Sat, Mar 27, 2010 at 08:48:34PM +0300, Avi Kivity wrote: On 03/26/2010 07:14 PM, Cam Macdonell wrote: I'm not familiar with the uio internals, but for the interface, an ioctl() on the fd to assign an eventfd to an MSI vector. Similar to ioeventfd, but instead of mapping a doorbell to an

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-28 Thread Michael S. Tsirkin
On Sun, Mar 28, 2010 at 11:02:11AM +0300, Avi Kivity wrote: On 03/28/2010 10:47 AM, Michael S. Tsirkin wrote: Maybe irqcontrol could be extended? What's irqcontrol? uio accepts 32 bit writes to the char device file. We can encode the fd number there, and use the high bit

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-28 Thread Michael S. Tsirkin
On Sun, Mar 28, 2010 at 12:45:02PM +0300, Avi Kivity wrote: On 03/28/2010 12:40 PM, Michael S. Tsirkin wrote: uio accepts 32 bit writes to the char device file. We can encode the fd number there, and use the high bit to signal assign/deassign. Ugh. Very unexpandable

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-03-31 Thread Michael S. Tsirkin
On Mon, Mar 29, 2010 at 11:59:24PM +0300, Avi Kivity wrote: On 03/28/2010 10:48 PM, Cam Macdonell wrote: On Sat, Mar 27, 2010 at 11:48 AM, Avi Kivitya...@redhat.com wrote: On 03/26/2010 07:14 PM, Cam Macdonell wrote: I'm not familiar with the uio internals, but for the

Re: [PATCH] kvm: Increase NR_IOBUS_DEVS limit to 200

2010-03-31 Thread Michael S. Tsirkin
On Tue, Mar 30, 2010 at 04:48:25PM -0700, Sridhar Samudrala wrote: This patch increases the current hardcoded limit of NR_IOBUS_DEVS from 6 to 200. We are hitting this limit when creating a guest with more than 1 virtio-net device using vhost-net backend. Each virtio-net device requires 2 such

Re: [PATCH][QEMU][VHOST]fix feature bit handling for mergeable rx buffers

2010-03-31 Thread Michael S. Tsirkin
On Tue, Mar 30, 2010 at 12:21:05PM -0700, David L Stevens wrote: This patch adds mergeable receive buffer support to qemu-kvm, to allow enabling it when vhost_net supports it. It also adds a missing call to vhost_net_ack_features() to push acked features to vhost_net. The patch is

Re: [PATCH v2] Add Mergeable RX buffer feature to vhost_net

2010-03-31 Thread Michael S. Tsirkin
On Tue, Mar 30, 2010 at 07:23:48PM -0600, David Stevens wrote: This patch adds support for the Mergeable Receive Buffers feature to vhost_net. Changes: 1) generalize descriptor allocation functions to allow multiple descriptors per packet 2) add socket peek

Re: [PATCH 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-01 Thread Michael S. Tsirkin
On Thu, Apr 01, 2010 at 05:27:18PM +0800, Xin Xiaohui wrote: Add a device to utilize the vhost-net backend driver for copy-less data transfer between guest FE and host NIC. It pins the guest user space to the host memory and provides proto_ops as sendmsg/recvmsg to vhost-net. Signed-off-by:

Re: [PATCH v2] Add Mergeable RX buffer feature to vhost_net

2010-04-01 Thread Michael S. Tsirkin
On Wed, Mar 31, 2010 at 03:04:43PM -0700, David Stevens wrote: Michael S. Tsirkin m...@redhat.com wrote on 03/31/2010 05:02:28 AM: attached patch seems to be whiespace damaged as well. Does the origin pass checkpatch.pl for you? Yes, but I probably broke it in the transfer

Re: [PATCH 0/1] uio_pci_generic: extensions to allow access for non-privileged processes

2010-04-01 Thread Michael S. Tsirkin
On Wed, Mar 31, 2010 at 05:08:38PM -0700, Tom Lyon wrote: uio_pci_generic has previously been discussed on the KVM list, but this patch has nothing to do with KVM, so it is also going to LKML. The point of this patch is to beef up the uio_pci_generic driver so that a non-privileged user

Re: [PATCH v3 1/1] Shared memory uio_pci driver

2010-04-01 Thread Michael S. Tsirkin
On Thu, Apr 01, 2010 at 11:58:29AM +0300, Avi Kivity wrote: On 03/31/2010 12:12 PM, Michael S. Tsirkin wrote: $ echo 4 /sys/.../msix/allocate $ # subdirectories 0 1 2 3 magically appear $ # bind fd 13 to msix There's no way to know, when qemu starts, how many vectors

Re: [PATCH v1 2/3] Provides multiple submits and asynchronous notifications.

2010-04-01 Thread Michael S. Tsirkin
On Thu, Apr 01, 2010 at 05:14:56PM +0800, Xin Xiaohui wrote: The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case. Signed-off-by: Xin Xiaohui xiaohui@intel.com ---

Re: [PATCH v2] Add Mergeable RX buffer feature to vhost_net

2010-04-04 Thread Michael S. Tsirkin
On Thu, Apr 01, 2010 at 11:22:37AM -0700, David Stevens wrote: kvm-ow...@vger.kernel.org wrote on 04/01/2010 03:54:15 AM: On Wed, Mar 31, 2010 at 03:04:43PM -0700, David Stevens wrote: + head.iov_base = (void *)vhost_get_vq_desc(net-dev, vq, +

Re: [PATCH] vhost: Make it more scalable by creating a vhost thread per device.

2010-04-04 Thread Michael S. Tsirkin
On Fri, Apr 02, 2010 at 10:31:20AM -0700, Sridhar Samudrala wrote: Make vhost scalable by creating a separate vhost thread per vhost device. This provides better scaling across multiple guests and with multiple interfaces in a guest. Thanks for looking into this. An alternative approach is to

Re: [PATCHv6 0/4] qemu-kvm: vhost net port

2010-04-04 Thread Michael S. Tsirkin
On Wed, Mar 24, 2010 at 02:38:57PM +0200, Avi Kivity wrote: On 03/17/2010 03:04 PM, Michael S. Tsirkin wrote: This is port of vhost v6 patch set I posted previously to qemu-kvm, for those that want to get good performance out of it :) This patchset needs to be applied when qemu.git one gets

Re: [PATCH 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-06 Thread Michael S. Tsirkin
On Tue, Apr 06, 2010 at 01:41:37PM +0800, Xin, Xiaohui wrote: Michael, For the DOS issue, I'm not sure how much the limit get_user_pages() can pin is reasonable, should we compute the bindwidth to make it? There's a ulimit for locked memory. Can we use this, decreasing the value for

Re: [PATCH v1 2/3] Provides multiple submits and asynchronous notifications.

2010-04-06 Thread Michael S. Tsirkin
On Tue, Apr 06, 2010 at 01:46:56PM +0800, Xin, Xiaohui wrote: Michael, For the write logging, do you have a function in hand that we can recompute the log? If that, I think I can use it to recompute the log info when the logging is suddenly enabled. For the outstanding requests, do you

Re: [PATCH 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-07 Thread Michael S. Tsirkin
On Wed, Apr 07, 2010 at 10:41:08AM +0800, Xin, Xiaohui wrote: Michael, Qemu needs a userspace write, is that a synchronous one or asynchronous one? It's a synchronous non-blocking write. Sorry, why the Qemu live migration needs the device have a userspace write? how does the write

Re: [PATCH v1 2/3] Provides multiple submits and asynchronous notifications.

2010-04-07 Thread Michael S. Tsirkin
On Wed, Apr 07, 2010 at 09:36:36AM +0800, Xin, Xiaohui wrote: Michael, For the write logging, do you have a function in hand that we can recompute the log? If that, I think I can use it to recompute the log info when the logging is suddenly enabled. For the outstanding requests, do

Re: [PATCH v3] Add Mergeable receive buffer support to vhost_net

2010-04-07 Thread Michael S. Tsirkin
On Tue, Apr 06, 2010 at 01:32:53PM -0700, David L Stevens wrote: This patch adds support for the Mergeable Receive Buffers feature to vhost_net. +-DLS Changes from previous revision: 1) renamed: vhost_discard_vq_desc -

Re: [PATCH 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-07 Thread Michael S. Tsirkin
On Wed, Apr 07, 2010 at 05:00:39PM +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com --- Michael, Thanks a lot for the explanation. I have drafted a patch for the qemu write after I looked into tun driver. Does it do in right way? Thanks Xiaohui

Re: [PATCH v3] Add Mergeable receive buffer support to vhost_net

2010-04-07 Thread Michael S. Tsirkin
Some corrections: On Wed, Apr 07, 2010 at 01:59:10PM +0300, Michael S. Tsirkin wrote: On Tue, Apr 06, 2010 at 01:32:53PM -0700, David L Stevens wrote: This patch adds support for the Mergeable Receive Buffers feature to vhost_net. +-DLS

[GIT PULL] vhost-net fix for 2.6.34-rc3

2010-04-07 Thread Michael S. Tsirkin
David, The following tree includes a patch fixing an issue with vhost-net in 2.6.34-rc3. Please pull for 2.6.34. Thanks! The following changes since commit 2eaa9cfdf33b8d7fb7aff27792192e0019ae8fc6: Linux 2.6.34-rc3 (2010-03-30 09:24:39 -0700) are available in the git repository at:

Re: [PATCH v3] Add Mergeable receive buffer support to vhost_net

2010-04-08 Thread Michael S. Tsirkin
On Wed, Apr 07, 2010 at 02:07:18PM -0700, David Stevens wrote: kvm-ow...@vger.kernel.org wrote on 04/07/2010 11:09:30 AM: On Wed, Apr 07, 2010 at 10:37:17AM -0700, David Stevens wrote: Thanks! There's some whitespace damage, are you sending with your new sendmail setup? It

Re: [PATCH] vhost: Make it more scalable by creating a vhost thread per device.

2010-04-11 Thread Michael S. Tsirkin
On Thu, Apr 08, 2010 at 05:05:42PM -0700, Sridhar Samudrala wrote: On Mon, 2010-04-05 at 10:35 -0700, Sridhar Samudrala wrote: On Sun, 2010-04-04 at 14:14 +0300, Michael S. Tsirkin wrote: On Fri, Apr 02, 2010 at 10:31:20AM -0700, Sridhar Samudrala wrote: Make vhost scalable by creating

Re: [PATCH] vhost: Make it more scalable by creating a vhost thread per device.

2010-04-12 Thread Michael S. Tsirkin
On Thu, Apr 08, 2010 at 05:05:42PM -0700, Sridhar Samudrala wrote: On Mon, 2010-04-05 at 10:35 -0700, Sridhar Samudrala wrote: On Sun, 2010-04-04 at 14:14 +0300, Michael S. Tsirkin wrote: On Fri, Apr 02, 2010 at 10:31:20AM -0700, Sridhar Samudrala wrote: Make vhost scalable by creating

Re: [PATCH] vhost: Make it more scalable by creating a vhost thread per device.

2010-04-12 Thread Michael S. Tsirkin
On Mon, Apr 12, 2010 at 10:35:31AM -0700, Sridhar Samudrala wrote: On Sun, 2010-04-11 at 18:47 +0300, Michael S. Tsirkin wrote: On Thu, Apr 08, 2010 at 05:05:42PM -0700, Sridhar Samudrala wrote: On Mon, 2010-04-05 at 10:35 -0700, Sridhar Samudrala wrote: On Sun, 2010-04-04 at 14:14 +0300

Re: [PATCH v4 0/3] PCI Shared memory device

2010-04-12 Thread Michael S. Tsirkin
On Wed, Apr 07, 2010 at 04:51:57PM -0600, Cam Macdonell wrote: Latest patch for PCI shared memory device that maps a host shared memory object to be shared between guests FWIW, I still think it would be better to reuse virtio-pci spec for feature negotiation, control etc even if Anthony nacks

Re: [PATCH] vhost-net: fix vq_memory_access_ok error checking

2010-04-13 Thread Michael S. Tsirkin
On Wed, Apr 07, 2010 at 09:59:10AM -0400, Jeff Dike wrote: vq_memory_access_ok needs to check whether mem == NULL Signed-off-by: Jeff Dike jd...@linux.intel.com Signed-off-by: Michael S. Tsirkin m...@redhat.com This was already queued by me, you do not need to fill Dave's inbox with vhost

Re: [PATCH] vhost-net: fix vq_memory_access_ok error checking

2010-04-13 Thread Michael S. Tsirkin
On Tue, Apr 13, 2010 at 06:01:21PM +0300, Michael S. Tsirkin wrote: On Wed, Apr 07, 2010 at 09:59:10AM -0400, Jeff Dike wrote: vq_memory_access_ok needs to check whether mem == NULL Signed-off-by: Jeff Dike jd...@linux.intel.com Signed-off-by: Michael S. Tsirkin m...@redhat.com

Re: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-14 Thread Michael S. Tsirkin
On Fri, Apr 02, 2010 at 03:25:00PM +0800, xiaohui@intel.com wrote: The idea is simple, just to pin the guest VM user space and then let host NIC driver has the chance to directly DMA to it. The patches are based on vhost-net backend driver. We add a device which provides proto_ops as

Re: [RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-14 Thread Michael S. Tsirkin
On Wed, Apr 14, 2010 at 04:55:21PM +0200, Arnd Bergmann wrote: On Friday 09 April 2010, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com Add a device to utilize the vhost-net backend driver for copy-less data transfer between guest FE and host NIC. It pins the guest

Re: [RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-14 Thread Michael S. Tsirkin
On Wed, Apr 14, 2010 at 05:57:54PM +0200, Arnd Bergmann wrote: On Wednesday 14 April 2010, Michael S. Tsirkin wrote: On Wed, Apr 14, 2010 at 04:55:21PM +0200, Arnd Bergmann wrote: On Friday 09 April 2010, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com It seems

Re: [RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-14 Thread Michael S. Tsirkin
On Wed, Apr 14, 2010 at 06:35:57PM +0200, Arnd Bergmann wrote: On Wednesday 14 April 2010, Michael S. Tsirkin wrote: qemu needs the ability to inject raw packets into device from userspace, bypassing vhost/virtio (for live migration). Ok, but since there is only a write

Re: [RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-14 Thread Michael S. Tsirkin
On Wed, Apr 14, 2010 at 10:39:49PM +0200, Arnd Bergmann wrote: On Wednesday 14 April 2010 22:31:42 Michael S. Tsirkin wrote: On Wed, Apr 14, 2010 at 06:35:57PM +0200, Arnd Bergmann wrote: On Wednesday 14 April 2010, Michael S. Tsirkin wrote: qemu needs the ability to inject raw

Re: [RFC][PATCH v3 1/3] A device for zero-copy based on KVM virtio-net.

2010-04-15 Thread Michael S. Tsirkin
On Thu, Apr 15, 2010 at 05:01:10PM +0800, Xin, Xiaohui wrote: It smells like a layering violation to look at the iocb-private field from a lower-level driver. I would have hoped that it's possible to implement this without having this driver know about the higher-level vhost driver internals.

Re: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-15 Thread Michael S. Tsirkin
On Thu, Apr 15, 2010 at 05:36:07PM +0800, Xin, Xiaohui wrote: Michael, The idea is simple, just to pin the guest VM user space and then let host NIC driver has the chance to directly DMA to it. The patches are based on vhost-net backend driver. We add a device which provides proto_ops

Re: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-19 Thread Michael S. Tsirkin
On Mon, Apr 19, 2010 at 06:05:17PM +0800, Xin, Xiaohui wrote: Michael, The idea is simple, just to pin the guest VM user space and then let host NIC driver has the chance to directly DMA to it. The patches are based on vhost-net backend driver. We add a device which provides

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-04-19 Thread Michael S. Tsirkin
On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Any comments? -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-21 Thread Michael S. Tsirkin
On Tue, Apr 20, 2010 at 10:21:55AM +0800, Xin, Xiaohui wrote: Michael, What we have not done yet: packet split support What does this mean, exactly? We can support 1500MTU, but for jumbo frame, since vhost driver before don't support mergeable buffer, we cannot try it for

Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes

2010-04-21 Thread Michael S. Tsirkin
devices compliant + * to PCI 2.3 (circa 2002) and all compliant PCI Express devices should + * support one of these. */ #include linux/device.h @@ -27,7 +28,7 @@ #define DRIVER_VERSION 0.01.0 #define DRIVER_AUTHORMichael S. Tsirkin m...@redhat.com -#define DRIVER_DESC

Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes

2010-04-21 Thread Michael S. Tsirkin
On Wed, Apr 21, 2010 at 12:31:50PM +0200, Hans J. Koch wrote: On Wed, Apr 21, 2010 at 12:38:49PM +0300, Michael S. Tsirkin wrote: + j++; + } + } + for (i = 0, j = 0; i PCI_STD_RESOURCE_END +j MAX_UIO_PORT_REGIONS; i

Re: [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH

2010-04-21 Thread Michael S. Tsirkin
On Tue, Apr 20, 2010 at 02:22:58PM +0100, Paul Brook wrote: Does this mean that virtio-blk supports all three combinations? 1. FLUSH that isn't a barrier 2. FLUSH that is also a barrier 3. Barrier that is not a flush 1 is good for fsync-like operations; 2 is good for

Re: [RFC][PATCH v2 0/3] Provide a zero-copy method on KVM virtio-net.

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 04:57:56PM +0800, Xin, Xiaohui wrote: Michael, Yes, I think this packet split mode probably maps well to mergeable buffer support. Note that 1. Not all devices support large packets in this way, others might map to indirect buffers better Do the indirect

Re: [RFC][PATCH v3 2/3] Provides multiple submits and asynchronous notifications.

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 04:37:16PM +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case.

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L Stevens dlstev...@us.ibm.com BTW, which userspace should I use for testing this? -- To unsubscribe from this list: send the line unsubscribe kvm

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 11:47:15AM -0600, David Stevens wrote: Michael S. Tsirkin m...@redhat.com wrote on 04/22/2010 05:02:25 AM: On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L

Re: [PATCH v4] Add mergeable RX bufs support to vhost

2010-04-22 Thread Michael S. Tsirkin
On Thu, Apr 22, 2010 at 11:59:55AM -0600, David Stevens wrote: Michael S. Tsirkin m...@redhat.com wrote on 04/22/2010 10:43:49 AM: On Mon, Apr 19, 2010 at 03:12:19PM -0700, David L Stevens wrote: This patch adds the mergeable RX buffers feature to vhost. Signed-off-by: David L

Re: [PATCHv5] add mergeable receiver buffers support to vhost

2010-04-24 Thread Michael S. Tsirkin
On Fri, Apr 23, 2010 at 01:06:45PM -0700, David L Stevens wrote: This patch adds mergeable receive buffers support to vhost. Signed-off-by: David L Stevens dlstev...@us.ibm.com It seems the logging is wrong. Did you test live migration? Please do. I think reason for the bug could be you did

Re: [RFC][PATCH v3 2/3] Provides multiple submits and asynchronous notifications.

2010-04-24 Thread Michael S. Tsirkin
On Fri, Apr 23, 2010 at 03:08:33PM +0800, xiaohui@intel.com wrote: From: Xin Xiaohui xiaohui@intel.com The vhost-net backend now only supports synchronous send/recv operations. The patch provides multiple submits and asynchronous notifications. This is needed for zero-copy case.

Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.

2010-04-25 Thread Michael S. Tsirkin
On Sun, Apr 25, 2010 at 02:55:29AM -0700, David Miller wrote: From: xiaohui@intel.com Date: Sun, 25 Apr 2010 17:20:06 +0800 The idea is simple, just to pin the guest VM user space and then let host NIC driver has the chance to directly DMA to it. Isn't it much easier to map the RX

Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.

2010-04-25 Thread Michael S. Tsirkin
On Sun, Apr 25, 2010 at 05:20:06PM +0800, xiaohui@intel.com wrote: We provide an zero-copy method which driver side may get external buffers to DMA. Here external means driver don't use kernel space to allocate skb buffers. Currently the external buffer can be from guest virtio-net driver.

[PATCH] qemu-kvm: fix crash on reboot with vhost-net

2010-04-26 Thread Michael S. Tsirkin
notifications - if vector is unmasked, invoke callback to unassign backend, then disable future notifications Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Note: this patch is for qemu-kvm, the code in question is not in qemu.git. hw/msix.c | 15 --- 1 files changed, 12

Re: [PATCH v6] Add mergeable rx buffer support to vhost_net

2010-04-26 Thread Michael S. Tsirkin
On Mon, Apr 26, 2010 at 02:20:52PM -0700, David L Stevens wrote: This patch adds mergeable receive buffer support to vhost_net. +-DLS Signed-off-by: David L Stevens dlstev...@us.ibm.com OK, looks good. I still think iovec handling is a bit off, as

[PATCHv2] qemu-kvm: fix crash on reboot with vhost-net

2010-04-28 Thread Michael S. Tsirkin
didn't have time to run. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Changes from v1: Separate APIs to set and unset notifiers Test and clear notifier before destroying it hw/msix.c | 40 +++- hw/msix.h |1 + hw/virtio

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-04-28 Thread Michael S. Tsirkin
On Tue, Apr 20, 2010 at 12:26:27AM +0300, Michael S. Tsirkin wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Any comments? Rusty? -- To unsubscribe from this list: send the line

Re: [PATCHv2] qemu-kvm: fix crash on reboot with vhost-net

2010-04-28 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 02:43:05PM -0300, Marcelo Tosatti wrote: Signed-off-by: Michael S. Tsirkin m...@redhat.com Applied, thanks. Can you tell me what commit id it has pls (for backport to rhel6). -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message

[RHEL6.0 PATCH] qemu-kvm: fix crash on reboot with vhost-net

2010-04-28 Thread Michael S. Tsirkin
notifications This patch also polls notifier before closing it, to make sure we don't lose events if poll callback didn't have time to run. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/msix.c | 40 +++- hw/msix.h |1 + hw/virtio-pci.c |7

Re: [RHEL6.0 PATCH] qemu-kvm: fix crash on reboot with vhost-net

2010-04-28 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 11:16:15PM +0300, Michael S. Tsirkin wrote: Bugzilla: 585940 Upstream status: applied on qemu-kvm.git, commit 992cc816c42f2e93db033919a9ddbfcd1da4 Please disregard, sent to this list in error. Sorry about the noise. -- To unsubscribe from this list: send the line

Re: [PATCH V3] drivers/uio/uio_pci_generic.c: allow access for non-privileged processes

2010-04-30 Thread Michael S. Tsirkin
On Thu, Apr 29, 2010 at 12:29:40PM -0700, Tom Lyon wrote: Michael, et al - sorry for the delay, but I've been digesting the comments and researching new approaches. I think the plan for V4 will be to take things entirely out of the UIO framework, and instead have a driver which supports

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-04-30 Thread Michael S. Tsirkin
commit 2809e94f5f26d89dc5232aaec753ffda95c4d95e Author: Michael S. Tsirkin m...@redhat.com Date: Thu Apr 29 16:18:08 2010 +0300 vhost-net: minor tweaks in mergeable buffer code Applies the following tweaks on top of mergeable buffers patch: 1. vhost_get_desc_n assumes that all

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-04-30 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 01:57:12PM -0700, David L Stevens wrote: This patch adds mergeable receive buffer support to vhost_net. Signed-off-by: David L Stevens dlstev...@us.ibm.com You can find the latest version on the following net-next based tree:

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-03 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 01:57:12PM -0700, David L Stevens wrote: This patch adds mergeable receive buffer support to vhost_net. Signed-off-by: David L Stevens dlstev...@us.ibm.com I've been doing some more testing before sending out a pull request, and I see a drastic performance degradation

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-03 Thread Michael S. Tsirkin
On Mon, May 03, 2010 at 08:39:08AM -0700, David Stevens wrote: Michael S. Tsirkin m...@redhat.com wrote on 05/03/2010 03:34:11 AM: On Wed, Apr 28, 2010 at 01:57:12PM -0700, David L Stevens wrote: This patch adds mergeable receive buffer support to vhost_net. Signed-off-by: David L

[GIT PULL] first round of vhost-net enhancements for net-next

2010-05-03 Thread Michael S. Tsirkin
commit 7ef527377b88ff05fb122a47619ea506c631c914: Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (2010-05-02 22:02:06 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost Michael S. Tsirkin (2

Re: [GIT PULL] first round of vhost-net enhancements for net-next

2010-05-03 Thread Michael S. Tsirkin
On Mon, May 03, 2010 at 03:08:29PM -0700, David Miller wrote: From: David Miller da...@davemloft.net Date: Mon, 03 May 2010 15:07:29 -0700 (PDT) From: Michael S. Tsirkin m...@redhat.com Date: Tue, 4 May 2010 00:32:45 +0300 The following tree includes a couple of enhancements that help

[GIT PULL] amended: first round of vhost-net enhancements for net-next

2010-05-04 Thread Michael S. Tsirkin
-0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost Michael S. Tsirkin (2): tun: add ioctl to modify vnet header size macvtap: add ioctl to modify vnet header size drivers/net/macvtap.c | 27

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-04 Thread Michael S. Tsirkin
virtio: put last_used and last_avail index into ring itself. Generally, the other end of the virtio ring doesn't need to see where you're up to in consuming the ring. However, to completely understand what's going on from the outside, this information must be exposed. For example, if you

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 08:54:59PM +0200, Christoph Hellwig wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph, could you look over this please? I note that the interface seems

Re: [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 09:56:18PM +0300, Michael S. Tsirkin wrote: On Tue, May 04, 2010 at 08:54:59PM +0200, Christoph Hellwig wrote: On Fri, Feb 19, 2010 at 12:22:20AM +0200, Michael S. Tsirkin wrote: I took a stub at documenting CMD and FLUSH request types in virtio block. Christoph

Re: [Qemu-devel] [PATCH] virtio-spec: document block CMD and FLUSH

2010-05-04 Thread Michael S. Tsirkin
On Tue, May 04, 2010 at 08:56:14PM +0200, Christoph Hellwig wrote: On Tue, Apr 20, 2010 at 02:46:35AM +0100, Jamie Lokier wrote: Does this mean that virtio-blk supports all three combinations? 1. FLUSH that isn't a barrier 2. FLUSH that is also a barrier 3. Barrier that is not

question on virtio

2010-05-05 Thread Michael S. Tsirkin
Hi! I see this in virtio_ring.c: /* Put entry in available array (but don't update avail-idx * until they do sync). */ Why is it done this way? It seems that updating the index straight away would be simpler, while this might allow the host to specilatively look up the buffer

[PATCH RFC] virtio: put last seen used index into ring itself

2010-05-05 Thread Michael S. Tsirkin
the last available index until we have a use for it. Signed-off-by: Rusty Russell ru...@rustcorp.com.au Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Rusty, this is a simplified form of a patch you posted in the past. I have a vhost patch that, using this feature, shows external to host

Re: question on virtio

2010-05-05 Thread Michael S. Tsirkin
On Wed, May 05, 2010 at 02:40:15PM -0500, Anthony Liguori wrote: On 05/05/2010 06:09 AM, Michael S. Tsirkin wrote: Hi! I see this in virtio_ring.c: /* Put entry in available array (but don't update avail-idx * until they do sync). */ Why is it done this way? It seems

Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-06 Thread Michael S. Tsirkin
On Thu, May 06, 2010 at 12:01:34PM +0930, Rusty Russell wrote: On Thu, 6 May 2010 06:28:14 am Michael S. Tsirkin wrote: Rusty, this is a simplified form of a patch you posted in the past. I have a vhost patch that, using this feature, shows external to host bandwidth grow from 5 to 7 GB/s

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-06 Thread Michael S. Tsirkin
On Thu, May 06, 2010 at 10:22:12AM +0930, Rusty Russell wrote: On Wed, 5 May 2010 03:52:36 am Michael S. Tsirkin wrote: virtio: put last_used and last_avail index into ring itself. Generally, the other end of the virtio ring doesn't need to see where you're up to in consuming

[PATCH RFC] qemu/virtio: use last used index published by guest

2010-05-06 Thread Michael S. Tsirkin
Reduces irq_window in guest by only injecting an interrupt if guest has handled all buffers we used so far. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- This is the qemu part of the story. hw/vhost_net.c |6 ++ hw/virtio.c| 15 +++ hw/virtio.h|4

Re: virtio: put last_used and last_avail index into ring itself.

2010-05-09 Thread Michael S. Tsirkin
On Fri, May 07, 2010 at 12:35:39PM +0930, Rusty Russell wrote: On Thu, 6 May 2010 03:57:55 pm Michael S. Tsirkin wrote: On Thu, May 06, 2010 at 10:22:12AM +0930, Rusty Russell wrote: On Wed, 5 May 2010 03:52:36 am Michael S. Tsirkin wrote: What do you think? I think everyone

Re: [RFC][PATCH v4 00/18] Provide a zero-copy method on KVM virtio-net.

2010-05-09 Thread Michael S. Tsirkin
On Sat, May 08, 2010 at 03:55:48PM +0800, Xin, Xiaohui wrote: Michael, Sorry, somehow I missed this mail. :-( Here, we have ever considered 2 ways to utilize the page constructor API to dispense the user buffers. One: Modify __alloc_skb() function a bit, it can only allocate a

Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-09 Thread Michael S. Tsirkin
On Fri, May 07, 2010 at 01:03:28PM +0930, Rusty Russell wrote: On Thu, 6 May 2010 03:49:46 pm Michael S. Tsirkin wrote: Now, I also added an mb() in guest between read and write so that last used index write can not get ahead of used index read. It does feel good to have it there, but I can

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 01:57:12PM -0700, David L Stevens wrote: @@ -218,18 +248,19 @@ static void handle_rx(struct vhost_net * use_mm(net-dev.mm); mutex_lock(vq-mutex); vhost_disable_notify(vq); - hdr_size = vq-hdr_size; + vhost_hlen = vq-vhost_hlen;

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread Michael S. Tsirkin
On Mon, May 10, 2010 at 10:09:03AM -0700, David Stevens wrote: Since datalen carries the difference and will be negative by that amount from the original loop, what about just adding something like: } if (headcount) heads[headcount-1].len += datalen; [and

Re: [PATCHv7] add mergeable buffers support to vhost_net

2010-05-10 Thread Michael S. Tsirkin
On Wed, Apr 28, 2010 at 01:57:12PM -0700, David L Stevens wrote: @@ -218,18 +248,19 @@ static void handle_rx(struct vhost_net * use_mm(net-dev.mm); mutex_lock(vq-mutex); vhost_disable_notify(vq); - hdr_size = vq-hdr_size; + vhost_hlen = vq-vhost_hlen;

[PATCH RFC] vhost: fix barrier pairing

2010-05-11 Thread Michael S. Tsirkin
is empty and waits for interrupt. Note: the barrier we pair with here is in drivers/virtio/virtio_ring.c, function vring_enable_cb. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- Dave, I think this is needed in 2.6.34, I'll send a pull request after doing some more testing. Rusty, Juan

virtio: power management

2010-05-11 Thread Michael S. Tsirkin
Anyone looked at power management with virtio? virtio-pci has callbacks to save/restore pci config on suspend/resume, but it seems that more action, such as restoring queue state, would be needed for e.g. suspend to disk to work. Rusty, any hints on the code in virtio-pci that deals with suspend?

Re: [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-11 Thread Michael S. Tsirkin
On Tue, May 11, 2010 at 01:46:08PM -0500, Ryan Harper wrote: * Michael S. Tsirkin m...@redhat.com [2010-05-05 16:37]: Generally, the Host end of the virtio ring doesn't need to see where Guest is up to in consuming the ring. However, to completely understand what's going on from

Re: [Qemu-devel] [PATCH RFC] virtio: put last seen used index into ring itself

2010-05-11 Thread Michael S. Tsirkin
On Tue, May 11, 2010 at 10:27:22PM +0300, Avi Kivity wrote: On 05/07/2010 06:23 AM, Rusty Russell wrote: On Thu, 6 May 2010 07:30:00 pm Avi Kivity wrote: On 05/05/2010 11:58 PM, Michael S. Tsirkin wrote: + /* We publish the last-seen used index at the end of the available ring

Re: [PATCH v2] pci: cleanly backout of pci_qdev_init()

2010-05-11 Thread Michael S. Tsirkin
On Tue, May 11, 2010 at 06:44:21AM -0400, Alex Williamson wrote: If the init function of a device fails, as might happen with device assignment, we never undo the work done by do_pci_register_device(). This not only causes a bit of a memory leak, but also leaves a bogus pointer in the bus

[GIT PULL] last minute vhost-net fix

2010-05-13 Thread Michael S. Tsirkin
) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git net-2.6 Michael S. Tsirkin (1): vhost: fix barrier pairing drivers/vhost/vhost.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) -- MST -- To unsubscribe from this list

  1   2   3   4   5   6   7   8   9   10   >