Re: [net-next RFC V4 PATCH 0/4] Multiqueue virtio-net

2012-06-25 Thread Shirley Ma
Hello Jason, Good work. Do you have local guest to guest results? Thanks Shirley -- 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

Re: [RFC:kvm] export host NUMA info to guest & make emulated device NUMA attr

2012-05-18 Thread Shirley Ma
On Thu, 2012-05-17 at 17:20 +0800, Liu Ping Fan wrote: > Currently, the guest can not know the NUMA info of the vcpu, which > will > result in performance drawback. > > This is the discovered and experiment by > Shirley Ma > Krishna Kumar >

Re: [PATCH RFC] tun: experimental zero copy tx support

2012-05-16 Thread Shirley Ma
On Mon, 2012-05-14 at 21:39 +0300, Michael S. Tsirkin wrote: > > Hello Mike, > > > > Have you tested this patch? I think the difference between macvtap > and > > tap is tap forwarding the packet to bridge. The zerocopy is disabled > in > > this case. > > > > Shirley > > Testing in progress, but

Re: [PATCH RFC] tun: experimental zero copy tx support

2012-05-15 Thread Shirley Ma
On Mon, 2012-05-14 at 22:31 +0300, Michael S. Tsirkin wrote: > On Mon, May 14, 2012 at 09:21:47PM +0200, Eric Dumazet wrote: > > On Mon, 2012-05-14 at 22:14 +0300, Michael S. Tsirkin wrote: > > > > > They seem to be in net-next, or did I miss something? > > > > Yes, you re-introduce in this patch

Re: [PATCH RFC] tun: experimental zero copy tx support

2012-05-14 Thread Shirley Ma
On Sun, 2012-05-13 at 18:52 +0300, Michael S. Tsirkin wrote: > Let vhost-net utilize zero copy tx when the experimental > zero copy mode is enabled and when used with tun. This works on > top of the patchset 'copy aside frags with destructors' that I posted > previously. This is not using tcp so d

Re: [RFC PATCH 0/1] NUMA aware scheduling per cpu vhost thread patch

2012-04-05 Thread Shirley Ma
On Thu, 2012-04-05 at 08:22 -0700, Shirley Ma wrote: > Haven't had time to focus on single stream result yet. I forgot to mention that if I switch the vhost scheduling to per-device based from per vq based, this minor single stream test regression will be gone. However the improv

Re: [RFC PATCH 0/1] NUMA aware scheduling per cpu vhost thread patch

2012-04-05 Thread Shirley Ma
On Thu, 2012-04-05 at 15:28 +0300, Michael S. Tsirkin wrote: > On Tue, Mar 27, 2012 at 10:43:03AM -0700, Shirley Ma wrote: > > On Tue, 2012-03-27 at 18:09 +0800, Jason Wang wrote: > > > Hi: > > > > > > Thanks for the work and it looks very reasonable, some

Re: [RFC PATCH 0/1] NUMA aware scheduling per vhost thread patch

2012-03-27 Thread Shirley Ma
On Tue, 2012-03-27 at 18:09 +0800, Jason Wang wrote: > Hi: > > Thanks for the work and it looks very reasonable, some questions > below. > > On 03/23/2012 07:48 AM, Shirley Ma wrote: > > Sorry for being late to submit this patch. I have spent lots of time > > tr

Re: [RFC PATCH 1/1] NUMA aware scheduling per cpu vhost thread

2012-03-22 Thread Shirley Ma
Resubmit it with the right format. Signed-off-by: Shirley Ma Signed-off-by: Krishna Kumar Tested-by: Tom Lendacky --- drivers/vhost/net.c | 26 ++- drivers/vhost/vhost.c| 300 -- drivers/vhost/vhost.h| 16

[RFC PATCH 1/1] NUMA aware scheduling per cpu vhost thread

2012-03-22 Thread Shirley Ma
Signed-off-by: Shirley Ma Signed-off-by: Krishna Kumar Tested-by: Tom Lendacky --- drivers/vhost/net.c | 26 ++- drivers/vhost/vhost.c| 300 -- drivers/vhost/vhost.h| 16 ++- 3 files changed, 243 insertions

[RFC PATCH 0/1] NUMA aware scheduling per vhost thread patch

2012-03-22 Thread Shirley Ma
n. If the host scheduler ensures that the VM's vcpus are not scheduled to another socket (i.e. cpu mask the vcpus on same socket) then the performance will be better. Signed-off-by: Shirley Ma Signed-off-by: Krishna Kumar Tested-by: Tom Lendacky --- drivers/vhost/net.c |

Re: [PATCH RFC net-next] virtio_net: refill buffer right after being used

2011-07-30 Thread Shirley Ma
On Fri, 2011-07-29 at 16:58 -0700, Mike Waychison wrote: > On Fri, Jul 29, 2011 at 3:55 PM, Shirley Ma > wrote: > > Resubmit it with a typo fix. > > > > Signed-off-by: Shirley Ma > > --- > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virt

Re: [PATCH RFC net-next] virtio_net: refill buffer right after being used

2011-07-29 Thread Shirley Ma
Resubmit it with a typo fix. Signed-off-by: Shirley Ma --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 0c7321c..c8201d4 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -429,6 +429,22 @@ static int add_recvbuf_mergeable(struct virtnet_info *vi

[PATCH RFC net-next] virtio_net: refill buffer right after being used

2011-07-29 Thread Shirley Ma
To even the latency, refill buffer right after being used. Sign-off-by: Shirley Ma --- diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 0c7321c..c8201d4 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -429,6 +429,22 @@ static int

Re: [PATCH RFC] vhost: address fixme in vhost TX zero-copy support

2011-07-11 Thread Shirley Ma
On Tue, 2011-07-12 at 01:04 +0300, Michael S. Tsirkin wrote: > So the following should do it, on top of Shirleys's patch, I think. > I'm > a bit not sure about using vq->upend_idx - vq->done_idx to check the > number of outstanding DMA, Shirley, what do you think? Yes, you can use this to track #

[PATCH net-next] skbuff: clear tx zero-copy flag

2011-07-09 Thread Shirley Ma
Hello Dave, This patch clears tx zero-copy flag as needed. Sign-off-by: Shirley Ma --- net/core/skbuff.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index a9577a2..d220119 100644 --- a/net/core/skbuff.c +++ b/net/core

Re: [PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers

2011-07-07 Thread Shirley Ma
On Thu, 2011-07-07 at 04:01 -0700, David Miller wrote: > From: Shirley Ma > Date: Wed, 06 Jul 2011 15:22:12 -0700 > > > + while (head) { > > + put_page(head); > > + head = (

Re: [PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers

2011-07-06 Thread Shirley Ma
On Wed, 2011-07-06 at 17:01 -0600, Zan Lynx wrote: > On 7/6/2011 4:22 PM, Shirley Ma wrote: > > This patch adds userspace buffers support in skb shared info. A new > > struct skb_ubuf_info is needed to maintain the userspace buffers > > argument and index, a callback is use

[PATCH V8 4/4 net-next] vhost: vhost TX zero-copy support

2011-07-06 Thread Shirley Ma
This patch maintains the outstanding userspace buffers in the sequence it is delivered to vhost. The outstanding userspace buffers will be marked as done once the lower device buffers DMA has finished. This is monitored through last reference of kfree_skb callback. Two buffer index are used for

[PATCH V8 3/4 net-next] macvtap: macvtapTX zero-copy support

2011-07-06 Thread Shirley Ma
Only 128 bytes is copied, the rest of data is DMA mapped directly from userspace. Signed-off-by: Shirley Ma --- drivers/net/macvtap.c | 132 1 files changed, 121 insertions(+), 11 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers/net

[PATCH V8 2/4 net-next] skbuff: skb supports zero-copy buffers

2011-07-06 Thread Shirley Ma
added for zero-copy buffer check. Signed-off-by: Shirley Ma --- include/linux/skbuff.h | 16 ++ net/core/skbuff.c | 79 +++- 2 files changed, 94 insertions(+), 1 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h

[PATCH V8 1/4 net-next] sock.h: Add a new sock zero-copy flag

2011-07-06 Thread Shirley Ma
Signed-off-by: Shirley Ma --- include/net/sock.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index ae56da6..396f735 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -563,6 +563,7 @@ enum sock_flags

[PATCH V8 0/4 net-next] macvtap/vhost TX zero-copy support

2011-07-06 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced about 50% CPU usage for single stream test on the host, while 4K message size BW has increased about 50%). Th

Re: [PATCH V7 4/4 net-next] vhost: vhost TX zero-copy support

2011-07-06 Thread Shirley Ma
On Wed, 2011-06-29 at 12:13 +0300, Michael S. Tsirkin wrote: > On Sat, May 28, 2011 at 12:34:27PM -0700, Shirley Ma wrote: > > Hello Michael, > > > > In order to use wait for completion in shutting down, seems to me > > another work thread is needed to call vhost_ze

Re: [PATCH V7 4/4 net-next] vhost: vhost TX zero-copy support

2011-06-30 Thread Shirley Ma
On Wed, 2011-06-29 at 12:13 +0300, Michael S. Tsirkin wrote: > Assuming you mean vhost_zerocopy_signal_used, here's how I would do > it: > add a kref and a completion, signal completion in kref_put > callback, when backend is set - kref_get, on cleanup, > kref_put and then wait_for_completion_inter

Re: [PATCH V7 2/4 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-06-28 Thread Shirley Ma
I have submitted this patchset from Version 1 to Version 7 already in the past few months. Here is the link to the patchset: http://lists.openwall.net/netdev/2011/05/28/ I am working on V8 now. Thanks Shirley On Tue, 2011-06-28 at 16:35 -0700, David Miller wrote: > From: Shirley Ma >

Re: [PATCH V7 2/4 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-06-28 Thread Shirley Ma
On Mon, 2011-06-27 at 15:54 -0700, David Miller wrote: > From: Shirley Ma > Date: Mon, 27 Jun 2011 08:45:10 -0700 > > > To support skb zero-copy, a pointer is needed to add to skb share > info. > > Do you agree with this approach? If not, do you have any other > &

Re: [PATCH V7 2/4 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-06-27 Thread Shirley Ma
Hello Dave, To support skb zero-copy, a pointer is needed to add to skb share info. Do you agree with this approach? If not, do you have any other suggestions? Thanks Shirley On Sat, 2011-05-28 at 12:23 -0700, Shirley Ma wrote: > From: > Shir

Re: [PATCH V7 1/4 net-next] sock.h: Add a new sock zero-copy flag

2011-05-28 Thread Shirley Ma
On Sat, 2011-05-28 at 12:15 -0700, Shirley Ma wrote: > include/net/sock.h |1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > > diff --git a/include/net/sock.h b/include/net/sock.h > index f2046e4..2229bd1 100644 > --- a/include/net/sock.h > +++ b/include/net/sock

[PATCH V7 4/4 net-next] vhost: vhost TX zero-copy support

2011-05-28 Thread Shirley Ma
Hello Michael, In order to use wait for completion in shutting down, seems to me another work thread is needed to call vhost_zerocopy_add_used, it seems too much work to address a minor issue here. Do we really need it? Right now, the approach I am using is to ignore outstanding userspace buffers

[PATCH V7 3/4]macvtap: macvtap TX zero-copy support

2011-05-28 Thread Shirley Ma
Only when buffer size is greater than or equal PAGE_SIZE, macvtap enables zero-copy. Signed-off-by: Shirley Ma --- drivers/net/macvtap.c | 131 1 files changed, 120 insertions(+), 11 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers

[PATCH V7 2/4 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-05-28 Thread Shirley Ma
? From the comments, this destructor_arg is used for destructor, destructor calls doesn't wait for last reference to that skb is gone. Signed-off-by: Shirley Ma --- include/linux/skbuff.h | 24 net/core/skbuff.c | 73 2

[PATCH V7 1/4 net-next] sock.h: Add a new sock zero-copy flag

2011-05-28 Thread Shirley Ma
include/net/sock.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index f2046e4..2229bd1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -563,6 +563,7 @@ enum sock_flags { SOCK_TIMESTAMPING_SYS_HARDWARE, /* %SOF_

[PATCH V7 0/4 net-next] macvtap/vhost TX zero-copy support

2011-05-28 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced about 50% CPU usage for single stream test on the host, while 4K message size BW has increased about 50%). Th

Re: [PATCH V6 0/4 net-next] macvtap/vhost TX zero-copy support

2011-05-28 Thread Shirley Ma
On Thu, 2011-05-26 at 13:31 -0700, Shirley Ma wrote: > On Thu, 2011-05-26 at 23:28 +0300, Michael S. Tsirkin wrote: > > On Thu, May 26, 2011 at 01:00:20PM -0700, Shirley Ma wrote: > > > 3. Add sleep in vhost shutting down instead of busy-wait for > > outstanding > &g

Re: [PATCH V6 2/4 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-05-26 Thread Shirley Ma
On Thu, 2011-05-26 at 22:55 +0200, Eric Dumazet wrote: > Le jeudi 26 mai 2011 à 13:24 -0700, Shirley Ma a écrit : > > > I could reduce callback pointer by moving it to *arg, but not desc, > this > > indicates that which buffer DMA hasn't done yet in *arg. > > &g

Re: [PATCH V6 0/4 net-next] macvtap/vhost TX zero-copy support

2011-05-26 Thread Shirley Ma
On Thu, 2011-05-26 at 23:28 +0300, Michael S. Tsirkin wrote: > On Thu, May 26, 2011 at 01:00:20PM -0700, Shirley Ma wrote: > > 3. Add sleep in vhost shutting down instead of busy-wait for > outstanding > >DMAs. > > I still think this is not much better. We need to use

Re: [PATCH V6 2/4 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-05-26 Thread Shirley Ma
On Thu, 2011-05-26 at 22:04 +0200, Eric Dumazet wrote: > Le jeudi 26 mai 2011 à 12:36 -0700, Shirley Ma a écrit : > > This patch adds userspace buffers support in skb shared info. A new > > struct skb_ubuf_info is needed to maintain the userspace buffers > > argument and inde

[PATCH V6 0/4 net-next] macvtap/vhost TX zero-copy support

2011-05-26 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced about 50% CPU usage for single stream test on the host, while 4K message size BW has increased about 50%). Th

[PATCH V6 4/4 net-next] vhost: vhost TX zero-copy support

2011-05-26 Thread Shirley Ma
Hello Michael, Let me anything I might miss from your preview's review. Thanks Shirley --- This patch maintains the outstanding userspace buffers in the sequence it is delivered to vhost. The outstanding userspace buffers will be marked as done once the lower device buffers DMA has fi

[PATCH V6 3/4]macvtap: macvtap TX zero-copy support

2011-05-26 Thread Shirley Ma
Only when buffer size is greater than GOODCOPY_LEN (256), macvtap enables zero-copy. Signed-off-by: Shirley Ma --- drivers/net/macvtap.c | 132 1 files changed, 121 insertions(+), 11 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers

[PATCH V6 2/4 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-05-26 Thread Shirley Ma
any userspace apps to reference these userspace buffers, then these userspaces buffers will be copied into kernel. This way we can prevent userspace apps to hold these userspace buffers too long. Signed-off-by: Shirley Ma --- include/linux/skbuff.h | 26 +++ net/core/skbuff.c

[PATCH V6 1/4 net-next] sock.h: Add a new sock zero-copy flag

2011-05-26 Thread Shirley Ma
Signed-off-by: Shirley Ma --- include/net/sock.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index 01810a3..ab09097 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -562,6 +562,7 @@ enum sock_flags

[PATCH V6 0/4]

2011-05-26 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced about 50% CPU usage for single stream test on the host, while 4K message size BW has increased about 50%). Th

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-26 Thread Shirley Ma
On Thu, 2011-05-26 at 11:49 +0300, Michael S. Tsirkin wrote: > > > > > - SG support > > > - HIGHDMA support (on arches where this makes sense) > > > > This can be checked by device flags. > > OK, but pls note that SG can get turned off dynamically. Tested the patch w/i SG dynmically on/off and

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-26 Thread Shirley Ma
On Thu, 2011-05-26 at 11:49 +0300, Michael S. Tsirkin wrote: > On Wed, May 25, 2011 at 03:49:40PM -0700, Shirley Ma wrote: > > On Fri, 2011-05-20 at 02:41 +0300, Michael S. Tsirkin wrote: > > > So the requirements are > > > - data must be released in a timely fashio

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-25 Thread Shirley Ma
On Fri, 2011-05-20 at 02:41 +0300, Michael S. Tsirkin wrote: > So the requirements are > - data must be released in a timely fashion (e.g. unlike virtio-net > tun or bridge) The current patch doesn't enable tun zero-copy. tun will copy data It's not an issue now. We can disallow macvtap attach to

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-19 Thread Shirley Ma
On Wed, 2011-05-18 at 10:00 -0700, Shirley Ma wrote: > On Wed, 2011-05-18 at 19:51 +0300, Michael S. Tsirkin wrote: > > > > Yes, I agree. I think for tcpdump, we really need to copy the > > data > > > > anyway, to avoid guest changing it in between. So we do th

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 19:51 +0300, Michael S. Tsirkin wrote: > > > Yes, I agree. I think for tcpdump, we really need to copy the > data > > > anyway, to avoid guest changing it in between. So we do that and > then > > > use the copy everywhere, release the old one. Hmm? > > > > Yes. Old one use

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 19:36 +0300, Michael S. Tsirkin wrote: > On Wed, May 18, 2011 at 09:07:37AM -0700, Shirley Ma wrote: > > On Wed, 2011-05-18 at 18:47 +0300, Michael S. Tsirkin wrote: > > > On Wed, May 18, 2011 at 07:38:27AM -0700, Shirley Ma wrote: > > > > On

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 18:47 +0300, Michael S. Tsirkin wrote: > On Wed, May 18, 2011 at 07:38:27AM -0700, Shirley Ma wrote: > > On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > > > >> >> Not more other restrictions, skb clone is OK. > pskb_expand_head()

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 07:38 -0700, Shirley Ma wrote: > On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > > >> >> Not more other restrictions, skb clone is OK. > pskb_expand_head() > > looks > > >> >> OK to me from code review. > > &

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-18 Thread Shirley Ma
On Wed, 2011-05-18 at 13:40 +0200, Michał Mirosław wrote: > >> >> Not more other restrictions, skb clone is OK. pskb_expand_head() > looks > >> >> OK to me from code review. > >> > Hmm. pskb_expand_head calls skb_release_data while keeping > >> > references to pages. How is that ok? What do I miss?

Re: [PATCH V6 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
macvtap.c so we can discard the desc even in zero-copy case. Signed-off-by: Shirley Ma --- drivers/vhost/net.c | 42 +- drivers/vhost/vhost.c | 49 + drivers/vhost/vhost.h | 13 + 3 files

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Wed, 2011-05-18 at 00:28 +0300, Michael S. Tsirkin wrote: > On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: > > Resubmit the patch with most update. This patch passed some > > live-migration test against RHEL6.2. I will run more stress test w/i > > live migra

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Shirley Ma
On Wed, 2011-05-18 at 00:58 +0200, Michał Mirosław wrote: > W dniu 18 maja 2011 00:28 użytkownik Shirley Ma > napisał: > > On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: > >> 2011/5/17 Shirley Ma : > >> > Looks like to use a new flag require

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 23:48 +0200, Michał Mirosław wrote: > 2011/5/17 Shirley Ma : > > Hello Michael, > > > > Looks like to use a new flag requires more time/work. I am thinking > > whether we can just use HIGHDMA flag to enable zero-copy in macvtap > to > &

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Wed, 2011-05-18 at 00:28 +0300, Michael S. Tsirkin wrote: > On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: > > Resubmit the patch with most update. This patch passed some > > live-migration test against RHEL6.2. I will run more stress test w/i > > live migra

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 23:58 +0300, Michael S. Tsirkin wrote: > On Tue, May 17, 2011 at 01:50:19PM -0700, Shirley Ma wrote: > > Resubmit the patch with most update. This patch passed some > > live-migration test against RHEL6.2. I will run more stress test w/i > > live migrati

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 09:21 +0300, Michael S. Tsirkin wrote: > Problem is, in your patch there are a set of restrictions on what the > device can do with the skb that we need to enforce somehow. > Also, how do we know it's a 'real NIC' and not a software device? I checked macvtap newlink, it doesn

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
Resubmit the patch with most update. This patch passed some live-migration test against RHEL6.2. I will run more stress test w/i live migration. Signed-off-by: Shirley Ma --- drivers/vhost/net.c | 37 +++- drivers/vhost/vhost.c | 55

[TEST PATCH net-next] vhost: accumulate multiple used and sigal in vhost TX test

2011-05-17 Thread Shirley Ma
Hello Michael, Here is the patch I used to test out of order before: add used in a pend array, and swap the last two ids. I used to hit an issue, but now it seems working well. This won't impact zero-copy patch since we need to maintain the pend used ids anyway. Signed-off-by: Shirl

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 18:28 +0300, Michael S. Tsirkin wrote: > Which is the order the descriptors are put on avail ring. > By design, guest should not depend on used ring entries > being in order with avail ring (and btw with virtio block, > they aren't). If it does, it's a bug I think. Ok, I thou

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-17 Thread Shirley Ma
On Tue, 2011-05-17 at 08:55 +0300, Michael S. Tsirkin wrote: > Something in your patch that overwrites the id in vhost > and makes it put the wrong id in the used ring? > > By the way, need to keep in mind that a guest can > give us the same head twice, need to make sure this > at least does not c

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
On Tue, 2011-05-17 at 00:24 +0300, Michael S. Tsirkin wrote: > On Mon, May 16, 2011 at 01:56:54PM -0700, Shirley Ma wrote: > > On Mon, 2011-05-16 at 23:45 +0300, Michael S. Tsirkin wrote: > > > > +/* Since we need to keep the order of used_idx as avail_idx, >

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Shirley Ma
Hello Michael, Looks like to use a new flag requires more time/work. I am thinking whether we can just use HIGHDMA flag to enable zero-copy in macvtap to avoid the new flag for now since mavctap uses real NICs as lower device? Thanks Shirley -- To unsubscribe from this list: send the line "unsub

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
On Tue, 2011-05-17 at 00:24 +0300, Michael S. Tsirkin wrote: > Very strange, it sounds like a bug, but I can't tell where: in > host or in guest. If it's in the guest, we must fix it. > If in host, we should only fix it if it makes life simpler for us. > Could you try to nail it down pls? Another

Re: [PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
On Mon, 2011-05-16 at 23:45 +0300, Michael S. Tsirkin wrote: > > +/* Since we need to keep the order of used_idx as avail_idx, it's > possible that > > + * DMA done not in order in lower device driver for some reason. To > prevent > > + * used_idx out of order, upend_idx is used to track avail_idx

[PATCH V5 6/6 net-next] example: enable zero-copy support in ixgbe

2011-05-16 Thread Shirley Ma
Device can enable zero-copy flag when HIGHDMA is supported. Signed-off-by: Shirley Ma --- drivers/net/ixgbe/ixgbe_main.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 2dce3d0..7e9e881 100644

Re: [PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Shirley Ma
On Mon, 2011-05-16 at 20:35 +0100, Ben Hutchings wrote: > Sorry, bit 31 is taken. You get the job of turning features into a > wider bitmap. :) will do it. Thanks Shirley -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More

[PATCH V5 5/6 net-next] macvtap: macvtap TX zero-copy support

2011-05-16 Thread Shirley Ma
Only when buffer size is greater than GOODCOPY_LEN (256), macvtap enables zero-copy. Signed-off-by: Shirley Ma --- drivers/net/macvtap.c | 129 1 files changed, 118 insertions(+), 11 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers

[PATCH V5 4/6 net-next] vhost: vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
This patch maintains the outstanding userspace buffers in the sequence it is delivered to vhost. The outstanding userspace buffers will be marked as done once the lower device buffers DMA has finished. This is monitored through last reference of kfree_skb callback. Two buffer index are used for

[PATCH V5 3/6 net-next] skbuff: Add userspace zero-copy buffers in skb

2011-05-16 Thread Shirley Ma
-by: Shirley Ma --- include/linux/skbuff.h | 26 ++ net/core/skbuff.c | 13 + 2 files changed, 39 insertions(+), 0 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 79aafbb..40faffe 100644 --- a/include/linux/skbuff.h

[PATCH V5 2/6 net-next] netdevice.h: Add zero-copy flag in netdevice

2011-05-16 Thread Shirley Ma
Signed-off-by: Shirley Ma --- include/linux/netdevice.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index a134d80..2646251 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h

[PATCH V5 1/6 net-next] sock.h: Add a new sock zero-copy flag

2011-05-16 Thread Shirley Ma
Signed-off-by: Shirley Ma --- include/net/sock.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index f2046e4..2229bd1 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -563,6 +563,7 @@ enum sock_flags

[PATCH V5 0/6 net-next] macvtap/vhost TX zero-copy support

2011-05-16 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced 30-50% CPU usage for vhost thread for single stream test). The patchset is based on previous submission and c

Re: [PATCH V4 2/8] netdevice.h: Add a new zerocopy device flag

2011-05-05 Thread Shirley Ma
On Wed, 2011-05-04 at 16:13 -0700, Sridhar Samudrala wrote: > On Wed, 2011-05-04 at 00:55 -0700, Shirley Ma wrote: > > Signed-off-by: Shirley Ma > > --- > > > > include/linux/netdevice.h | 10 ++ > > 1 files changed, 10 insertions(+), 0 deletions

Re: [PATCH V4 5/8]macvtap: macvtap TX zero-copy support

2011-05-05 Thread Shirley Ma
On Wed, 2011-05-04 at 16:13 -0700, Sridhar Samudrala wrote: > On Wed, 2011-05-04 at 01:14 -0700, Shirley Ma wrote: > > Only when buffer size is greater than GOODCOPY_LEN (256), macvtap > > enables zero-copy. > > > > Signed-off-by: Shirley Ma > > --- >

Re: [PATCH V4 5/8]macvtap: macvtap TX zero-copy support

2011-05-04 Thread Shirley Ma
On Wed, 2011-05-04 at 19:12 +0300, Michael S. Tsirkin wrote: > On Wed, May 04, 2011 at 08:37:29AM -0700, Shirley Ma wrote: > > On Wed, 2011-05-04 at 17:58 +0300, Michael S. Tsirkin wrote: > > > On Wed, May 04, 2011 at 01:14:53AM -0700, Shirley Ma wrote: > > > > On

Re: [PATCH V4 5/8]macvtap: macvtap TX zero-copy support

2011-05-04 Thread Shirley Ma
On Wed, 2011-05-04 at 17:58 +0300, Michael S. Tsirkin wrote: > On Wed, May 04, 2011 at 01:14:53AM -0700, Shirley Ma wrote: > > Only when buffer size is greater than GOODCOPY_LEN (256), macvtap > > enables zero-copy. > > > > Signed-off-by: Shirley Ma > >

Re: [PATCH V4 4/8]vhost: vhost TX zero-copy support

2011-05-04 Thread Shirley Ma
On Wed, 2011-05-04 at 12:56 +0300, Michael S. Tsirkin wrote: > On Wed, May 04, 2011 at 01:11:24AM -0700, Shirley Ma wrote: > > This patch maintains the outstanding userspace buffers in the > > sequence it is delivered to vhost. The outstanding userspace > buffers > > wil

[PATCH V4 5/8]macvtap: macvtap TX zero-copy support

2011-05-04 Thread Shirley Ma
Only when buffer size is greater than GOODCOPY_LEN (256), macvtap enables zero-copy. Signed-off-by: Shirley Ma --- drivers/net/macvtap.c | 126 1 files changed, 115 insertions(+), 11 deletions(-) diff --git a/drivers/net/macvtap.c b/drivers

[PATCH V4 4/8]vhost: vhost TX zero-copy support

2011-05-04 Thread Shirley Ma
This patch maintains the outstanding userspace buffers in the sequence it is delivered to vhost. The outstanding userspace buffers will be marked as done once the lower device buffers DMA has finished. This is monitored through last reference of kfree_skb callback. Two buffer index are used for

[PATCH V4 3/8] skbuff: Add userspace buffers support in skb (zero-copy)

2011-05-04 Thread Shirley Ma
skb has a 256 bytes copied data in head to make sure we have enough room for head expanding; and mapped the rest of userspace buffers in skb frags. Signed-off-by: Shirley Ma --- include/linux/skbuff.h | 26 ++ net/core/skbuff.c | 13 + 2 files

[PATCH V4 2/8] netdevice.h: Add a new zerocopy device flag

2011-05-04 Thread Shirley Ma
Signed-off-by: Shirley Ma --- include/linux/netdevice.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0249fe7..0808f1e 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h

[PATCH V4 1/8] sock.h: Add a new sock zero-copy flag

2011-05-04 Thread Shirley Ma
Signed-off-by: Shirley Ma --- include/net/sock.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/net/sock.h b/include/net/sock.h index 01810a3..ab09097 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -562,6 +562,7 @@ enum sock_flags

[PATCH V4 0/8] macvtap/vhost TX zero-copy support

2011-05-04 Thread Shirley Ma
This patchset add supports for TX zero-copy between guest and host kernel through vhost. It significantly reduces CPU utilization on the local host on which the guest is located (It reduced 30-50% CPU usage for vhost thread for single stream test). The patchset is based on previous submission and c

Re: [PATCH V3 2/8] Add a new zerocopy device flag

2011-05-03 Thread Shirley Ma
On Tue, 2011-05-03 at 10:42 -0700, Shirley Ma wrote: > Better to prevent this kind of skbs to be used in skb_clone, expand > head > for now. I looked at the code, skb_clone shouldn't have any problem since ubuf callback is only called after the lower device DMA has done. I can modif

Re: [PATCH V3 2/8] Add a new zerocopy device flag

2011-05-03 Thread Shirley Ma
On Mon, 2011-05-02 at 22:53 +0300, Michael S. Tsirkin wrote: > On Mon, May 02, 2011 at 11:47:08AM -0700, Shirley Ma wrote: > > On Mon, 2011-05-02 at 13:42 +0300, Michael S. Tsirkin wrote: > > > This comment should specify what exactly is the promise the > > > device

Re: [PATCH V3 3/8] Add userspace buffers support in skb

2011-05-03 Thread Shirley Ma
On Mon, 2011-05-02 at 13:53 +0300, Michael S. Tsirkin wrote: > On Wed, Apr 20, 2011 at 12:47:57PM -0700, Shirley Ma wrote: > > This patch adds userspace buffers support in skb. A new struct > > skb_ubuf_info is needed to maintain the userspace buffers argument > > and index,

Re: [PATCH V3 2/8] Add a new zerocopy device flag

2011-05-02 Thread Shirley Ma
On Mon, 2011-05-02 at 13:42 +0300, Michael S. Tsirkin wrote: > This comment should specify what exactly is the promise the > device makes by setting this flag. Specifically, the > condition is that no skb fragments are used > after the uinfo callback has been called. > > The way it's implemented,

Re: [PATCH V3 6/8] macvtap/vhost TX zero copy support

2011-05-02 Thread Shirley Ma
Resubmit the patch with a bug being found by , when he tested 2.6.38.2 kernel. When the virtio_net doesn't enable GSO, vnet hdr_len is 0, we can't use vnet hdr_len to allocate linear skb in zerocopy. Signed-off-by: Shirley Ma --- drivers/net/macvta

Re: [PATCH V3 0/8] macvtap/vhost TX zero copy support

2011-04-22 Thread Shirley Ma
On Wed, 2011-04-20 at 12:36 -0700, Shirley Ma wrote: > I am collecting more test results against 2.6.39-rc3 kernel and will > provide the test matrix later. Single TCP_STREAM 120 secs test results over ixgbe 10Gb NIC results: Message BW(Gb/s)qemu-kvm (NumCPU)vhost-net(NumCPU) PerfTop ir

Re: [PATCH V3 0/8] macvtap/vhost TX zero copy support

2011-04-22 Thread Shirley Ma
On Thu, 2011-04-21 at 10:29 -0400, Jon Mason wrote: > Why are only these 3 drivers getting support? As far as I can tell, > the only requirement is HIGHDMA. If this is the case, is there really > a need for an additional flag to support this? If you can key off of > HIGHDMA, all devices that sup

[PATCH V3 7/8] Enable ixgbe to support zerocopy

2011-04-20 Thread Shirley Ma
Signed-off-by: Shirley Ma --- drivers/net/ixgbe/ixgbe_main.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 6f8adc7..68f1e93 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe

[PATCH V3 3/8] Add userspace buffers support in skb

2011-04-20 Thread Shirley Ma
This patch adds userspace buffers support in skb. A new struct skb_ubuf_info is needed to maintain the userspace buffers argument and index, a callback is used to notify userspace to release the buffers once lower device has done DMA (Last reference to that skb has gone). Signed-off-by: Shirley

Re: [PATCH V3 5/8] Enable cxgb3 to support zerocopy

2011-04-20 Thread Shirley Ma
On Wed, 2011-04-20 at 13:58 -0700, Shirley Ma wrote: > This flag can be ON when HIGHDMA and scatter/gather support. I will > modify the patch to make it conditionally. Double checked, it only needs HIGHDMA condition, not scatter/gather. thanks Shirley -- To unsubscribe from this list: se

Re: [PATCH V3 5/8] Enable cxgb3 to support zerocopy

2011-04-20 Thread Shirley Ma
On Wed, 2011-04-20 at 13:52 -0700, Dimitris Michailidis wrote: > The features handling has been reworked in net-next and patches like > this > won't apply as the code you're patching has changed. Also core code > now > does a lot of the related work and you'll need to tell it what to do > with

Re: [PATCH V3 2/8] Add a new zerocopy device flag

2011-04-20 Thread Shirley Ma
Resubmit it with 31 bit. Signed-off-by: Shirley Ma --- include/linux/netdevice.h |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 0249fe7..0998d3d 100644 --- a/include/linux/netdevice.h +++ b/include/linux

Re: [PATCH V3 2/8] Add a new zerocopy device flag

2011-04-20 Thread Shirley Ma
On Wed, 2011-04-20 at 13:24 -0700, Dimitris Michailidis wrote: > Bit 30 is also taken in net-next. How about 31? Thanks Shirley -- 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/m

  1   2   3   4   >