Re: [RFC virtio-next 0/4] Introduce CAIF Virtio and reversed Vrings

2012-11-01 Thread Rusty Russell
Sjur Brændeland writes: > Zero-Copy data transport on the modem is primary goal for CAIF Virtio. > In order to achieve Zero-Copy the direction of the Virtio rings are > flipped in the RX direction. So we have implemented the Virtio > access-function similar to what is found in vhost.c. So, this a

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-11-01 Thread Amit Shah
On (Tue) 23 Oct 2012 [12:17:49], Rusty Russell wrote: > sjur.brandel...@stericsson.com writes: > > From: Sjur Brændeland > > @@ -1415,7 +1524,16 @@ static void remove_port_data(struct port *port) > > > > /* Remove buffers we queued up for the Host to send us data in. */ > > while ((buf

[PATCH -next] xen/x86: remove duplicated include from enlighten.c

2012-11-01 Thread Wei Yongjun
From: Wei Yongjun Remove duplicated include. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- arch/x86/xen/enlighten.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c inde

Re: [PATCHv2 net-next 1/8] skb: report completion status for zero copy skbs

2012-11-01 Thread David Miller
From: "Michael S. Tsirkin" Date: Wed, 31 Oct 2012 12:31:06 +0200 > -void vhost_zerocopy_callback(struct ubuf_info *ubuf) > +void vhost_zerocopy_callback(struct ubuf_info *ubuf, int zerocopy_status) If you're only reporting true/false values, even just for now, please use 'bool' for this. ___

Re: [PATCHv2 net-next 1/8] skb: report completion status for zero copy skbs

2012-11-01 Thread Michael S. Tsirkin
On Thu, Nov 01, 2012 at 11:50:24AM -0400, David Miller wrote: > From: "Michael S. Tsirkin" > Date: Wed, 31 Oct 2012 12:31:06 +0200 > > > -void vhost_zerocopy_callback(struct ubuf_info *ubuf) > > +void vhost_zerocopy_callback(struct ubuf_info *ubuf, int zerocopy_status) > > If you're only reporti

Re: [PATCHv2 net-next 1/8] skb: report completion status for zero copy skbs

2012-11-01 Thread David Miller
From: "Michael S. Tsirkin" Date: Thu, 1 Nov 2012 18:16:11 +0200 > Do you think it's over-engineering, or a good idea? Engineer what you need, not what you might need. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lis

Re: linux-next: Tree for Nov 1 (xen)

2012-11-01 Thread Randy Dunlap
On 10/31/2012 10:36 PM, Stephen Rothwell wrote: > Hi all, > > New trees: rr-fixes and swiotlb > > Changes since 20121031: > arch/x86/xen/enlighten.c:109:0: warning: "xen_pvh_domain" redefined include/xen/xen.h:23:0: note: this is the location of the previous definition Full randconfig file i

[PATCH 00/12] VMCI for Linux upstreaming

2012-11-01 Thread George Zhang
* * * This series of VMCI linux upstreaming patches include latest udpate from VMware. Summary of changes: - Use RCU for context lookup. - Remove redundant init()/empty functions. - Remove unnecessary ASSERTs. - Remove delayed event callbacks. - Cleanup so

[PATCH 01/12] VMCI: context implementation.

2012-11-01 Thread George Zhang
VMCI Context code maintains state for vmci and allows the driver to communicate with multiple VMs. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_context.c | 1247 ++ drivers/misc/vmw_vmci/vmci_context.h | 183 + 2 files changed, 1430 insertions(

[PATCH 02/12] VMCI: datagram implementation.

2012-11-01 Thread George Zhang
VMCI datagram Implements datagrams to allow data to be sent between host and guest. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_datagram.c | 506 + drivers/misc/vmw_vmci/vmci_datagram.h | 52 +++ 2 files changed, 558 insertions(+), 0 deletions(-

[PATCH 03/12] VMCI: doorbell implementation.

2012-11-01 Thread George Zhang
VMCI doorbell code allows for notifcations between host and guest. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_doorbell.c | 645 + drivers/misc/vmw_vmci/vmci_doorbell.h | 53 +++ 2 files changed, 698 insertions(+), 0 deletions(-) create mode 10

[PATCH 04/12] VMCI: device driver implementaton.

2012-11-01 Thread George Zhang
VMCI driver code implementes both the host and guest personalities of the VMCI driver. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_driver.c | 116 +++ drivers/misc/vmw_vmci/vmci_driver.h | 50 +++ 2 files changed, 166 insertions(+),

[PATCH 05/12] VMCI: event handling implementation.

2012-11-01 Thread George Zhang
VMCI event code that manages event handlers and handles callbacks when specific events fire. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_event.c | 229 drivers/misc/vmw_vmci/vmci_event.h | 25 2 files changed, 254 insertions(+), 0 dele

[PATCH 06/12] VMCI: handle array implementation.

2012-11-01 Thread George Zhang
VMCI handle code adds support for dynamic arrays that will grow if they need to. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_handle_array.c | 142 + drivers/misc/vmw_vmci/vmci_handle_array.h | 52 +++ 2 files changed, 194 insertions(+), 0 de

[PATCH 08/12] VMCI: resource object implementation.

2012-11-01 Thread George Zhang
VMCI resource tracks all used resources within the vmci code. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_resource.c | 232 + drivers/misc/vmw_vmci/vmci_resource.h | 59 2 files changed, 291 insertions(+), 0 deletions(-) create mode 10

[PATCH 09/12] VMCI: routing implementation.

2012-11-01 Thread George Zhang
VMCI routing code is responsible for routing between various hosts/guests as well as routing in nested scenarios. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_route.c | 233 drivers/misc/vmw_vmci/vmci_route.h | 30 + 2 files changed, 263

[PATCH 10/12] VMCI: guest side driver implementation.

2012-11-01 Thread George Zhang
VMCI guest side driver code implementation. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_guest.c | 762 1 files changed, 762 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_guest.c diff --git a/drivers/misc/vmw_vm

[PATCH 11/12] VMCI: host side driver implementation.

2012-11-01 Thread George Zhang
VMCI host side driver code implementation. Signed-off-by: George Zhang --- drivers/misc/vmw_vmci/vmci_host.c | 1036 + 1 files changed, 1036 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_host.c diff --git a/drivers/misc/vmw_vmc

[PATCH 12/12] VMCI: Some header and config files.

2012-11-01 Thread George Zhang
VMCI head config patch Adds all the necessary files to enable building of the VMCI module with the Linux Makefiles and Kconfig systems. Also adds the header files used for building modules against the driver. Signed-off-by: George Zhang --- drivers/misc/Kconfig|1 drive

[PATCHv3 net-next 0/8] enable/disable zero copy tx dynamically

2012-11-01 Thread Michael S. Tsirkin
tun supports zero copy transmit since 0690899b4d4501b3505be069b9a687e68ccbe15b, however you can only enable this mode if you know your workload does not trigger heavy guest to host/host to guest traffic - otherwise you get a (minor) performance regression. This patchset addresses this problem by n

[PATCHv3 net-next 1/8] skb: report completion status for zero copy skbs

2012-11-01 Thread Michael S. Tsirkin
Even if skb is marked for zero copy, net core might still decide to copy it later which is somewhat slower than a copy in user context: besides copying the data we need to pin/unpin the pages. Add a parameter reporting such cases through zero copy callback: if this happens a lot, device can take t

[PATCHv3 net-next 2/8] skb: api to report errors for zero copy skbs

2012-11-01 Thread Michael S. Tsirkin
Orphaning frags for zero copy skbs needs to allocate data in atomic context so is has a chance to fail. If it does we currently discard the skb which is safe, but we don't report anything to the caller, so it can not recover by e.g. disabling zero copy. Add an API to free skb reporting such errors

[PATCHv3 net-next 3/8] tun: report orphan frags errors to zero copy callback

2012-11-01 Thread Michael S. Tsirkin
When tun transmits a zero copy skb, it orphans the frags which might need to allocate extra memory, in atomic context. If that fails, notify ubufs callback before freeing the skb as a hint that device should disable zerocopy mode. Signed-off-by: Michael S. Tsirkin --- drivers/net/tun.c | 1 + 1

[PATCHv3 net-next 6/8] vhost: move -net specific code out

2012-11-01 Thread Michael S. Tsirkin
Zerocopy handling code is vhost-net specific. Move it from vhost.c/vhost.h out to net.c Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 45 drivers/vhost/tcm_vhost.c | 1 + drivers/vhost/vhost.c | 53 +++-

[PATCHv3 net-next 7/8] vhost-net: select tx zero copy dynamically

2012-11-01 Thread Michael S. Tsirkin
Even when vhost-net is in zero-copy transmit mode, net core might still decide to copy the skb later which is somewhat slower than a copy in user context: data copy overhead is added to the cost of page pin/unpin. The result is that enabling tx zero copy option leads to higher CPU utilization for g

[PATCHv3 net-next 8/8] vhost-net: reduce vq polling on tx zerocopy

2012-11-01 Thread Michael S. Tsirkin
It seems that to avoid deadlocks it is enough to poll vq before we are going to use the last buffer. This is faster than c70aa540c7a9f67add11ad3161096fb95233aa2e. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) di

[PATCHv3 net-next 4/8] vhost-net: cleanup macros for DMA status tracking

2012-11-01 Thread Michael S. Tsirkin
Better document macros for DMA tracking. Add an explicit one for DMA in progress instead of relying on user supplying len != 1. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/net.c | 3 ++- drivers/vhost/vhost.c | 2 +- drivers/vhost/vhost.h | 12 +--- 3 files changed, 12 insert

[PATCHv3 net-next 5/8] vhost: track zero copy failures using DMA length

2012-11-01 Thread Michael S. Tsirkin
This will be used to disable zerocopy when error rate is high. Signed-off-by: Michael S. Tsirkin --- drivers/vhost/vhost.c | 7 --- drivers/vhost/vhost.h | 4 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index f23cf89..5aff

Re: linux-next: Tree for Nov 1 (xen)

2012-11-01 Thread Konrad Rzeszutek Wilk
On Thu, Nov 01, 2012 at 10:18:47AM -0700, Randy Dunlap wrote: > On 10/31/2012 10:36 PM, Stephen Rothwell wrote: > > > Hi all, > > > > New trees: rr-fixes and swiotlb > > > > Changes since 20121031: > > > > > arch/x86/xen/enlighten.c:109:0: warning: "xen_pvh_domain" redefined > include/xen/xen

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-11-01 Thread Rusty Russell
Amit Shah writes: > On (Tue) 23 Oct 2012 [12:17:49], Rusty Russell wrote: >> sjur.brandel...@stericsson.com writes: >> > From: Sjur Brændeland > >> > @@ -1415,7 +1524,16 @@ static void remove_port_data(struct port *port) >> > >> >/* Remove buffers we queued up for the Host to send us data i