Re: [PATCH] vhost_net: stop polling socket during rx processing

2016-04-28 Thread Jason Wang
On 04/27/2016 07:28 PM, Michael S. Tsirkin wrote: > On Tue, Apr 26, 2016 at 03:35:53AM -0400, Jason Wang wrote: >> We don't stop polling socket during rx processing, this will lead >> unnecessary wakeups from under layer net devices (E.g >> sock_def_readable() form tun). R

Re: [PATCH 2/2] vhost: lockless enqueuing

2016-04-26 Thread Jason Wang
is contention. Pktgen tests shows about 5% improvement: >> >> Before: >> ~130 pps >> After: >> ~137 pps >> >> Signed-off-by: Jason Wang <jasow...@redhat.com> >> --- >> drivers/vhost/vhost.c | 52 >> +

[PATCH net-next V2] tuntap: calculate rps hash only when needed

2016-04-25 Thread Jason Wang
: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> Changes from V1: - Fix build when CONFIG_RPS is not set --- drivers/net/tun.c | 4 +++- net/core/dev.c| 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drive

Re: [PATCH net-next] tuntap: calculate rps hash only when needed

2016-04-25 Thread Jason Wang
On 04/26/2016 09:55 AM, Jason Wang wrote: > There's no need to calculate rps hash if it was not enabled. So this > patch export rps_needed and check it before trying to get rps > hash. Tests (using pktgen to inject packets to guest) shows this can > improve pps about 13% (when rps

[PATCH 1/2] vhost: simplify work flushing

2016-04-25 Thread Jason Wang
We used to implement the work flushing through tracking queued seq, done seq, and the number of flushing. This patch simplify this by just implement work flushing through another kind of vhost work with completion. This will be used by lockless enqueuing patch. Signed-off-by: Jason Wang <ja

[PATCH 2/2] vhost: lockless enqueuing

2016-04-25 Thread Jason Wang
We use spinlock to synchronize the work list now which may cause unnecessary contentions. So this patch switch to use llist to remove this contention. Pktgen tests shows about 5% improvement: Before: ~130 pps After: ~137 pps Signed-off-by: Jason Wang <jasow...@redhat.com> --- d

[PATCH net-next] tuntap: calculate rps hash only when needed

2016-04-25 Thread Jason Wang
: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/net/tun.c | 2 +- net/core/dev.c| 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index afdf950..746877f 100644 --- a/drivers/net

Re: [PATCH RFC 2/2] tun: don't set a default qdisc

2016-04-14 Thread Jason Wang
On 04/14/2016 05:10 PM, Michael S. Tsirkin wrote: > On Thu, Apr 14, 2016 at 05:07:50PM +0800, Jason Wang wrote: >> >> On 04/14/2016 05:05 PM, Michael S. Tsirkin wrote: >>> On Thu, Apr 14, 2016 at 02:49:28PM +0800, Jason Wang wrote: >>>>> >>>>

Re: [PATCH RFC 2/2] tun: don't set a default qdisc

2016-04-14 Thread Jason Wang
On 04/14/2016 05:05 PM, Michael S. Tsirkin wrote: > On Thu, Apr 14, 2016 at 02:49:28PM +0800, Jason Wang wrote: >> > >> > >> > On 04/13/2016 06:26 PM, Michael S. Tsirkin wrote: >>> > > On Wed, Apr 13, 2016 at 11:04:47AM +0200, Paolo Abeni wrote: &g

Re: [PATCH RFC 1/2] tun: don't require serialization lock on tx

2016-04-14 Thread Jason Wang
->vlan_features = dev->features & > ~(NETIF_F_HW_VLAN_CTAG_TX | > NETIF_F_HW_VLAN_STAG_TX); Acked-by: Jason Wang <jasow...@redhat.com>

Re: [PATCH RFC 2/2] tun: don't set a default qdisc

2016-04-14 Thread Jason Wang
On 04/13/2016 06:26 PM, Michael S. Tsirkin wrote: > On Wed, Apr 13, 2016 at 11:04:47AM +0200, Paolo Abeni wrote: >> This patch disables the default qdisc by explicitly setting the >> IFF_NO_QUEUE private flag so that now the tun xmit path do not >> require any lock by default. >> >> The default

[PATCH net] tuntap: restore default qdisc

2016-04-07 Thread Jason Wang
ix IFF_NO_QUEUE for drivers using alloc_netdev") Cc: Phil Sutter <p...@nwl.cc> Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/net/tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 510e90a..2c9e45f

Re: [PATCH net-next 1/6] net: skbuff: don't use union for napi_id and sender_cpu

2016-04-06 Thread Jason Wang
On 04/01/2016 09:04 PM, Eric Dumazet wrote: > On Fri, 2016-04-01 at 12:49 +0800, Jason Wang wrote: >> On 04/01/2016 10:55 AM, Eric Dumazet wrote: >>> On Fri, 2016-04-01 at 10:13 +0800, Jason Wang wrote: >>> >>> >>>> The problem is we want to suppo

Re: [PATCH net-next 1/6] net: skbuff: don't use union for napi_id and sender_cpu

2016-03-31 Thread Jason Wang
On 04/01/2016 10:55 AM, Eric Dumazet wrote: > On Fri, 2016-04-01 at 10:13 +0800, Jason Wang wrote: > > >> The problem is we want to support busy polling for tun. This needs >> napi_id to be passed to tun socket by sk_mark_napi_id() during >> tun_net_xmit(). But before

Re: [PATCH net-next 1/6] net: skbuff: don't use union for napi_id and sender_cpu

2016-03-31 Thread Jason Wang
On 04/01/2016 04:01 AM, David Miller wrote: > From: Eric Dumazet <eric.duma...@gmail.com> > Date: Thu, 31 Mar 2016 03:32:21 -0700 > >> On Thu, 2016-03-31 at 13:50 +0800, Jason Wang wrote: >>> We use a union for napi_id and send_cpu, this is ok for most of the

Re: [PATCH net-next 1/6] net: skbuff: don't use union for napi_id and sender_cpu

2016-03-31 Thread Jason Wang
On 03/31/2016 06:32 PM, Eric Dumazet wrote: > On Thu, 2016-03-31 at 13:50 +0800, Jason Wang wrote: >> We use a union for napi_id and send_cpu, this is ok for most of the >> cases except when we want to support busy polling for tun which needs >> napi_id to be stored and pa

[PATCH net-next 3/6] macvtap: socket rx busy polling support

2016-03-30 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/net/macvtap.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 95394ed..1891aff 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c @@ -20,6 +20,7 @@ #i

[PATCH net-next 0/6] net device rx busy polling support in vhost_net

2016-03-30 Thread Jason Wang
%/ -6% 1024/50/ +1%/ +1%/ +1%/ +1%/ -10% 1024/ 100/ +4%/ +4%/ +5%/ +5%/ -11% 1024/ 200/ +4%/ +5%/ +4%/ +4%/ -12% Thanks Jason Wang (6): net: skbuff: don't use union for napi_id and sender_cpu tuntap: socket rx busy polling support macvtap: socket rx

[PATCH net-next 1/6] net: skbuff: don't use union for napi_id and sender_cpu

2016-03-30 Thread Jason Wang
was enabled. Fixing by not using union for napi_id and sender_cpu. Signed-off-by: Jason Wang <jasow...@redhat.com> --- include/linux/skbuff.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 15d0df9..8aee891

[PATCH net-next 2/6] tuntap: socket rx busy polling support

2016-03-30 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/net/tun.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index afdf950..950faf5 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -69,6 +69,7 @@ #include #i

[PATCH net-next 4/6] net: core: factor out core busy polling logic to sk_busy_loop_once()

2016-03-30 Thread Jason Wang
This patch factors out core logic of busy polling to sk_busy_loop_once() in order to be reused by other modules. Signed-off-by: Jason Wang <jasow...@redhat.com> --- include/net/busy_poll.h | 7 ++ net/core/dev.c | 59 - 2

[PATCH net-next 5/6] net: export napi_by_id()

2016-03-30 Thread Jason Wang
This patch exports napi_by_id() which will be used by vhost_net socket busy polling. Signed-off-by: Jason Wang <jasow...@redhat.com> --- include/net/busy_poll.h | 1 + net/core/dev.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/net/busy_poll.h b/i

[PATCH net-next 6/6] vhost_net: net device rx busy polling support

2016-03-30 Thread Jason Wang
%/ +5%/ +5%/ +5%/ -11% 256/ 200/ +4%/ +4%/ +4%/ +4%/ -13% 1024/ 1/0%/ -3%/0%/0%/ -6% 1024/50/ +1%/ +1%/ +1%/ +1%/ -10% 1024/ 100/ +4%/ +4%/ +5%/ +5%/ -11% 1024/ 200/ +4%/ +5%/ +4%/ +4%/ -12% Signed-off-by: Jason Wang <ja

[RFC PATCH V2 0/2] basic device IOTLB support

2016-03-24 Thread Jason Wang
. Thanks Jason Wang (2): vhost: convert pre sorted vhost memory array to interval tree vhost: device IOTLB API drivers/vhost/net.c| 14 +- drivers/vhost/vhost.c | 427 +++-- drivers/vhost/vhost.h | 42 - fs/eventfd.c

[RFC PATCH V2 2/2] vhost: device IOTLB API

2016-03-24 Thread Jason Wang
userspace finishes the translation, it will update the vhost IOTLB through VHOST_UPDATE_IOTLB ioctl. Userspace is also in charge of snooping the IOTLB invalidation of IOMMU IOTLB and use VHOST_UPDATE_IOTLB to invalidate the possible entry in vhost. Signed-off-by: Jason Wang <jasow...@redhat.

[RFC PATCH V2 1/2] vhost: convert pre sorted vhost memory array to interval tree

2016-03-24 Thread Jason Wang
the userspace to send diffs of memory table. - Simplify Device IOTLB implementation. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c | 8 +-- drivers/vhost/vhost.c | 182 -- drivers/vhost/vhost.h | 27 ++-- 3

Re: [PATCH V4 0/3] basic busy polling support for vhost_net

2016-03-14 Thread Jason Wang
On 03/10/2016 02:48 PM, Michael Rapoport wrote: > Hi Greg, > >> > Greg Kurz <gk...@linux.vnet.ibm.com> wrote on 03/09/2016 09:26:45 PM: >>> > > On Fri, 4 Mar 2016 06:24:50 -0500 >>> > > Jason Wang <jasow...@redhat.com> wrote: >> &

[PATCH V4 1/3] vhost: introduce vhost_has_work()

2016-03-04 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. This could be used for busy polling code to exit the busy loop. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h |

[PATCH V4 0/3] basic busy polling support for vhost_net

2016-03-04 Thread Jason Wang
for busyloop_timeout - split out the busy polling logic into a new helper - check and exit the loop when there's a pending signal - disable preemption during busy looping to make sure lock_clock() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce

[PATCH V4 2/3] vhost: introduce vhost_vq_avail_empty()

2016-03-04 Thread Jason Wang
This patch introduces a helper which will return true if we're sure that the available ring is empty for a specific vq. When we're not sure, e.g vq access failure, return false instead. This could be used for busy polling code to exit the busy loop. Signed-off-by: Jason Wang <jasow...@redhat.

[PATCH V4 3/3] vhost_net: basic polling support

2016-03-04 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

Re: [PATCH V3 3/3] vhost_net: basic polling support

2016-02-28 Thread Jason Wang
On 02/29/2016 05:56 AM, Christian Borntraeger wrote: > On 02/26/2016 09:42 AM, Jason Wang wrote: >> > This patch tries to poll for new added tx buffer or socket receive >> > queue for a while at the end of tx/rx processing. The maximum time >> > spent on polling wer

Re: [PATCH V3 3/3] vhost_net: basic polling support

2016-02-28 Thread Jason Wang
On 02/28/2016 10:09 PM, Michael S. Tsirkin wrote: > On Fri, Feb 26, 2016 at 04:42:44PM +0800, Jason Wang wrote: >> > This patch tries to poll for new added tx buffer or socket receive >> > queue for a while at the end of tx/rx processing. The maximum time >> > s

[PATCH V3 1/3] vhost: introduce vhost_has_work()

2016-02-26 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. This could be used for busy polling code to exit the busy loop. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h |

[PATCH V3 3/3] vhost_net: basic polling support

2016-02-26 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

[PATCH V3 0/3] basic busy polling support for vhost_net

2016-02-26 Thread Jason Wang
and exit the loop when there's a pending signal - disable preemption during busy looping to make sure lock_clock() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce vhost_vq_avail_empty() vhost_net: basic polling support drivers/vhost/net.c| 79

[PATCH V3 2/3] vhost: introduce vhost_vq_avail_empty()

2016-02-26 Thread Jason Wang
This patch introduces a helper which will return true if we're sure that the available ring is empty for a specific vq. When we're not sure, e.g vq access failure, return false instead. This could be used for busy polling code to exit the busy loop. Signed-off-by: Jason Wang <jasow...@redhat.

Re: [RFC PATCH net-next 0/3] Extend macvtap with multiple qdiscs

2016-02-22 Thread Jason Wang
On 02/08/2016 11:14 AM, Vladislav Yasevich wrote: > This is an RFC series to extend macvtap with multiple qdisc. Right now > multiqueue macvtap setups suffer from lock contention. Macvtap sets > the queue index and thus gets a default qdisc allocated to it. Since > it later users

Re: [PATCH V2 0/3] basic busy polling support for vhost_net

2016-01-25 Thread Jason Wang
On 01/25/2016 03:58 PM, Michael Rapoport wrote: > (restored 'CC, sorry for dropping it originally, Notes is still hard > for me) > > > Jason Wang <jasow...@redhat.com> wrote on 01/25/2016 05:00:05 AM: > > On 01/24/2016 05:00 PM, Mike Rapoport wrote: > > &g

Re: [PATCH V2 2/3] vhost: introduce vhost_vq_more_avail()

2016-01-21 Thread Jason Wang
On 01/20/2016 10:09 PM, Michael S. Tsirkin wrote: > On Tue, Dec 01, 2015 at 02:39:44PM +0800, Jason Wang wrote: >> Signed-off-by: Jason Wang <jasow...@redhat.com> > Wow new API with no comments anywhere, and no > commit log to say what it's good for. > Want to know

Re: [PATCH V2 3/3] vhost_net: basic polling support

2016-01-21 Thread Jason Wang
On 01/20/2016 10:35 PM, Michael S. Tsirkin wrote: > On Tue, Dec 01, 2015 at 02:39:45PM +0800, Jason Wang wrote: >> This patch tries to poll for new added tx buffer or socket receive >> queue for a while at the end of tx/rx processing. The maximum time >> spent on polling w

Re: [PATCH RFC] vhost: basic device IOTLB support

2016-01-05 Thread Jason Wang
On 01/05/2016 11:18 AM, Yang Zhang wrote: > On 2016/1/4 14:22, Jason Wang wrote: >> >> >> On 01/04/2016 09:39 AM, Yang Zhang wrote: >>> On 2015/12/31 15:13, Jason Wang wrote: >>>> This patch tries to implement an device IOTLB for vhost. Thi

Re: [PATCH RFC] vhost: basic device IOTLB support

2016-01-03 Thread Jason Wang
On 01/04/2016 09:39 AM, Yang Zhang wrote: > On 2015/12/31 15:13, Jason Wang wrote: >> This patch tries to implement an device IOTLB for vhost. This could be >> used with for co-operation with userspace(qemu) implementation of >> iommu for a secure DMA environment in

Re: [PATCH RFC] vhost: basic device IOTLB support

2016-01-03 Thread Jason Wang
On 12/31/2015 07:17 PM, Michael S. Tsirkin wrote: > On Thu, Dec 31, 2015 at 03:13:45PM +0800, Jason Wang wrote: >> This patch tries to implement an device IOTLB for vhost. This could be >> used with for co-operation with userspace(qemu) implementation of >> iommu for a s

Re: [RFC v4 0/5] Add virtio transport for AF_VSOCK

2016-01-03 Thread Jason Wang
On 12/22/2015 05:07 PM, Stefan Hajnoczi wrote: > This series is based on v4.4-rc2 and the "virtio: make find_vqs() > checkpatch.pl-friendly" patch I recently submitted. > > v4: > * Addressed code review comments from Alex Bennee > * MAINTAINERS file entries for new files > * Trace events

[PATCH RFC] vhost: basic device IOTLB support

2015-12-30 Thread Jason Wang
ABLE is not reused (maybe there's a chance). - working at PAGE_SIZE level, don't support large mappings. - better data structure for IOTLB instead of simple hash array. - better API, e.g using mmap() instead of preset userspace address. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/v

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-12-03 Thread Jason Wang
On 12/02/2015 08:36 PM, Michael S. Tsirkin wrote: > On Wed, Dec 02, 2015 at 01:04:03PM +0800, Jason Wang wrote: >> >> On 12/01/2015 10:43 PM, Michael S. Tsirkin wrote: >>> On Tue, Dec 01, 2015 at 01:17:49PM +0800, Jason Wang wrote: >>>> On 11/30/201

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-12-01 Thread Jason Wang
On 12/01/2015 10:43 PM, Michael S. Tsirkin wrote: > On Tue, Dec 01, 2015 at 01:17:49PM +0800, Jason Wang wrote: >> >> On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote: >>> On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: >>>>> This patch tries to

Re: [PATCH net-next 3/3] vhost_net: basic polling support

2015-11-30 Thread Jason Wang
On 11/30/2015 06:44 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 03:11:29PM +0800, Jason Wang wrote: >> > This patch tries to poll for new added tx buffer or socket receive >> > queue for a while at the end of tx/rx processing. The maximum time >> > s

[PATCH V2 0/3] basic busy polling support for vhost_net

2015-11-30 Thread Jason Wang
for busyloop_timeout - Split out the busy polling logic into a new helper - Check and exit the loop when there's a pending signal - Disable preemption during busy looping to make sure lock_clock() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce vhost_vq_more_avail

Re: [PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-30 Thread Jason Wang
On 11/30/2015 04:22 PM, Michael S. Tsirkin wrote: > On Wed, Nov 25, 2015 at 03:11:28PM +0800, Jason Wang wrote: >> Signed-off-by: Jason Wang <jasow...@redhat.com> >> --- >> drivers/vhost/vhost.c | 26 +- >> drivers/vhost/vhost.h | 1 + &

[PATCH V2 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-30 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 13 + drivers/vhost/vhost.h | 1 + 2 files changed, 14 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..4f45a03 100644 --- a/drivers/vhost/vhost.c +++ b/drivers

[PATCH V2 3/3] vhost_net: basic polling support

2015-11-30 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

[PATCH V2 1/3] vhost: introduce vhost_has_work()

2015-11-30 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

[PATCH net-next 1/3] vhost: introduce vhost_has_work()

2015-11-24 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

[PATCH net-next 0/3] basic busy polling support for vhost_net

2015-11-24 Thread Jason Wang
() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce vhost_vq_more_avail() vhost_net: basic polling support drivers/vhost/net.c| 72 ++ drivers/vhost/vhost.c | 48

[PATCH net-next 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-24 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 26 +- drivers/vhost/vhost.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..b86c5aa 100644 --- a/drivers

[PATCH net-next 3/3] vhost_net: basic polling support

2015-11-24 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

Re: [PATCH] vhost: relax log address alignment

2015-11-16 Thread Jason Wang
_SIZE - 1))) { > r = -EINVAL; > break; > } Acked-by: Jason Wang <jasow...@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-16 Thread Jason Wang
On 11/13/2015 05:20 PM, Jason Wang wrote: > > On 11/12/2015 08:02 PM, Felipe Franciosi wrote: >> Hi Jason, >> >> I understand your busy loop timeout is quite conservative at 50us. Did you >> try any other values? > I've also tried 20us. And results shows 50u

Re: [PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-13 Thread Jason Wang
t tested this for vhost polling. Will run some simple test (e.g pin two vhost threads in one host cpu), and see how well it perform. Thanks > > Thanks, > Felipe > > > > On 12/11/2015 10:20, "kvm-ow...@vger.kernel.org on behalf of Jason Wang" > <kvm-ow...@vger.

[PATCH net-next RFC V3 3/3] vhost_net: basic polling support

2015-11-12 Thread Jason Wang
This patch tries to poll for new added tx buffer or socket receive queue for a while at the end of tx/rx processing. The maximum time spent on polling were specified through a new kind of vring ioctl. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c

[PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-12 Thread Jason Wang
logic into a new helper - Check and exit the loop when there's a pending signal - Disable preemption during busy looping to make sure lock_clock() was correctly used. Jason Wang (3): vhost: introduce vhost_has_work() vhost: introduce vhost_vq_more_avail() vhost_net: basic polling support

[PATCH net-next RFC V3 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-12 Thread Jason Wang
Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 26 +- drivers/vhost/vhost.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..b86c5aa 100644 --- a/drivers

[PATCH net-next RFC V3 1/3] vhost: introduce vhost_has_work()

2015-11-12 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

Re: [PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-12 Thread Jason Wang
On 11/12/2015 06:16 PM, Jason Wang wrote: > Hi all: > > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx/rx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of >

Re: [PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net

2015-11-02 Thread Jason Wang
On 10/30/2015 07:58 PM, Jason Wang wrote: > > On 10/29/2015 04:45 PM, Jason Wang wrote: >> Hi all: >> >> This series tries to add basic busy polling for vhost net. The idea is >> simple: at the end of tx processing, busy polling for new tx added >> descript

Re: [PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net

2015-10-30 Thread Jason Wang
On 10/29/2015 04:45 PM, Jason Wang wrote: > Hi all: > > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of > time (in

[PATCH net-next rfc V2 1/2] vhost: introduce vhost_has_work()

2015-10-29 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/v

[PATCH net-next rfc V2 0/2] basic busy polling support for vhost_net

2015-10-29 Thread Jason Wang
per VM through ioctl. Please review. Thanks Jason Wang (2): vhost: introduce vhost_has_work() vhost_net: basic polling support drivers/vhost/net.c | 54 +++ drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 3 files changed, 58

[PATCH net-next rfc V2 2/2] vhost_net: basic polling support

2015-10-29 Thread Jason Wang
. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c | 54 + 1 file changed, 50 insertions(+), 4 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 9eda69e..30e6d3d 100644 --- a/drivers/vhost/net.c

Re: [PATCH v1 1/3] virtio-net: Using single MSIX IRQ for TX/RX Q pair

2015-10-28 Thread Jason Wang
On 10/28/2015 03:21 PM, Michael S. Tsirkin wrote: > On Wed, Oct 28, 2015 at 11:13:39AM +0800, Jason Wang wrote: >> >> On 10/27/2015 04:38 PM, Michael S. Tsirkin wrote: >>> On Mon, Oct 26, 2015 at 10:52:47AM -0700, Ravi Kerur wrote: >>>> Ported earlier pat

Re: [PATCH v1 1/3] virtio-net: Using single MSIX IRQ for TX/RX Q pair

2015-10-27 Thread Jason Wang
On 10/27/2015 04:38 PM, Michael S. Tsirkin wrote: > On Mon, Oct 26, 2015 at 10:52:47AM -0700, Ravi Kerur wrote: >> Ported earlier patch from Jason Wang (dated 12/26/2014). >> >> This patch tries to reduce the number of MSIX irqs required for >> virtio-net by sharin

Re: [PATCH net] macvtap: unbreak receiving of gro skb with frag list

2015-10-27 Thread Jason Wang
On 10/27/2015 05:05 PM, Michael S. Tsirkin wrote: > On Tue, Oct 27, 2015 at 10:58:25AM +0800, Jason Wang wrote: >> >> On 10/26/2015 04:30 PM, Michael S. Tsirkin wrote: >>> On Mon, Oct 26, 2015 at 02:53:38PM +0800, Jason Wang wrote: >>>> On 10/26/201

Re: [PATCH net] macvtap: unbreak receiving of gro skb with frag list

2015-10-26 Thread Jason Wang
On 10/26/2015 02:09 PM, Michael S. Tsirkin wrote: > On Mon, Oct 26, 2015 at 11:15:57AM +0800, Jason Wang wrote: >> >> On 10/23/2015 09:37 PM, Michael S. Tsirkin wrote: >>> On Fri, Oct 23, 2015 at 12:57:05AM -0400, Jason Wang wrote: >>>> We don't h

Re: [PATCH v1 1/3] virtio-net: Using single MSIX IRQ for TX/RX Q pair

2015-10-26 Thread Jason Wang
On 10/27/2015 01:52 AM, Ravi Kerur wrote: > Ported earlier patch from Jason Wang (dated 12/26/2014). > > This patch tries to reduce the number of MSIX irqs required for > virtio-net by sharing a MSIX irq for each TX/RX queue pair through > channels. If transport support chan

Re: [PATCH net] macvtap: unbreak receiving of gro skb with frag list

2015-10-26 Thread Jason Wang
On 10/26/2015 04:30 PM, Michael S. Tsirkin wrote: > On Mon, Oct 26, 2015 at 02:53:38PM +0800, Jason Wang wrote: >> >> On 10/26/2015 02:09 PM, Michael S. Tsirkin wrote: >>> On Mon, Oct 26, 2015 at 11:15:57AM +0800, Jason Wang wrote: >>>> On 10/23/201

Re: [PATCH net] macvtap: unbreak receiving of gro skb with frag list

2015-10-25 Thread Jason Wang
On 10/23/2015 09:37 PM, Michael S. Tsirkin wrote: > On Fri, Oct 23, 2015 at 12:57:05AM -0400, Jason Wang wrote: >> We don't have fraglist support in TAP_FEATURES. This will lead >> software segmentation of gro skb with frag list. Fixes by having >> frag list su

Re: [PATCH net-next RFC 1/2] vhost: introduce vhost_has_work()

2015-10-23 Thread Jason Wang
On 10/22/2015 04:38 PM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 01:27:28AM -0400, Jason Wang wrote: >> > This path introduces a helper which can give a hint for whether or not >> > there's a work queued in the work list. >> > >> > Signed-

Re: [PATCH net-next RFC 2/2] vhost_net: basic polling support

2015-10-23 Thread Jason Wang
On 10/22/2015 05:33 PM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 01:27:29AM -0400, Jason Wang wrote: >> This patch tries to poll for new added tx buffer for a while at the >> end of tx processing. The maximum time spent on polling were limited >> through a modul

Re: [PATCH net-next RFC 2/2] vhost_net: basic polling support

2015-10-23 Thread Jason Wang
On 10/23/2015 12:16 AM, Michael S. Tsirkin wrote: > On Thu, Oct 22, 2015 at 08:46:33AM -0700, Rick Jones wrote: >> On 10/22/2015 02:33 AM, Michael S. Tsirkin wrote: >>> On Thu, Oct 22, 2015 at 01:27:29AM -0400, Jason Wang wrote: >>>> This patch tries to poll for n

[PATCH net] macvtap: unbreak receiving of gro skb with frag list

2015-10-22 Thread Jason Wang
("macvtap: simplify usage of tap_features") Cc: Vlad Yasevich <vyase...@redhat.com> Cc: Michael S. Tsirkin <m...@redhat.com> Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/net/macvtap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH net-next RFC 2/2] vhost_net: basic polling support

2015-10-21 Thread Jason Wang
. busyloop_timeout = 50 gives us following improvement on TCP_RR test: size/session/+thu%/+normalize% 1/ 1/ +5%/ -20% 1/50/ +17%/ +3% Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/net.c | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH net-next RFC 1/2] vhost: introduce vhost_has_work()

2015-10-21 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang <jasow...@redhat.com> --- drivers/vhost/vhost.c | 6 ++ drivers/vhost/vhost.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/vhost/vho

Re: [PATCH net-next] macvtap/macvlan: use IFF_NO_QUEUE

2015-08-30 Thread Jason Wang
On 08/28/2015 08:25 PM, Vlad Yasevich wrote: On 08/27/2015 10:42 PM, Jason Wang wrote: On 08/27/2015 06:43 PM, Michael S. Tsirkin wrote: On Wed, Aug 26, 2015 at 01:45:30PM +0800, Jason Wang wrote: On 08/26/2015 12:32 AM, Vlad Yasevich wrote: On 08/25/2015 07:30 AM, Jason Wang

Re: [PATCH net-next] macvtap/macvlan: use IFF_NO_QUEUE

2015-08-27 Thread Jason Wang
On 08/27/2015 06:43 PM, Michael S. Tsirkin wrote: On Wed, Aug 26, 2015 at 01:45:30PM +0800, Jason Wang wrote: On 08/26/2015 12:32 AM, Vlad Yasevich wrote: On 08/25/2015 07:30 AM, Jason Wang wrote: On 08/25/2015 06:17 PM, Michael S. Tsirkin wrote: On Mon, Aug 24, 2015 at 04:33:12PM +0800

[PATCH net-next] virtio-net: avoid unnecessary sg initialzation

2015-08-27 Thread Jason Wang
. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 53f5660..c006ae4 100644 --- a/drivers/net/virtio_net.c +++ b/drivers

Re: [PATCH net-next] macvtap/macvlan: use IFF_NO_QUEUE

2015-08-25 Thread Jason Wang
On 08/26/2015 12:32 AM, Vlad Yasevich wrote: On 08/25/2015 07:30 AM, Jason Wang wrote: On 08/25/2015 06:17 PM, Michael S. Tsirkin wrote: On Mon, Aug 24, 2015 at 04:33:12PM +0800, Jason Wang wrote: For macvlan, switch to use IFF_NO_QUEUE instead of tx_queue_len = 0. For macvtap, after

Re: [PATCH net-next] macvtap/macvlan: use IFF_NO_QUEUE

2015-08-25 Thread Jason Wang
On 08/25/2015 06:17 PM, Michael S. Tsirkin wrote: On Mon, Aug 24, 2015 at 04:33:12PM +0800, Jason Wang wrote: For macvlan, switch to use IFF_NO_QUEUE instead of tx_queue_len = 0. For macvtap, after commit 6acf54f1cf0a6747bac9fea26f34cfc5a9029523 (macvtap: Add support of packet capture

[PATCH net-next] macvtap/macvlan: use IFF_NO_QUEUE

2015-08-24 Thread Jason Wang
...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/macvlan.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/macvlan.c b/drivers/net/macvlan.c index 47da435..09d8718 100644 --- a/drivers/net/macvlan.c +++ b/drivers/net/macvlan.c @@ -1056,7

Re: [PATCH v2 1/2] virtio-net: rephrase devconf fields description

2015-08-19 Thread Jason Wang
On 08/19/2015 07:54 PM, Victor Kaplansky wrote: On Mon, Aug 17, 2015 at 10:43:46AM +0800, Jason Wang wrote: On 08/16/2015 09:42 PM, Victor Kaplansky wrote: Clarify general description of the mac, status and max_virtqueue_pairs fields. Specifically, the old description is vague about

Re: [PATCH v2 2/2] virtio-net: add default_mtu configuration field

2015-08-19 Thread Jason Wang
On 08/19/2015 07:31 PM, Victor Kaplansky wrote: On Mon, Aug 17, 2015 at 11:07:15AM +0800, Jason Wang wrote: On 08/16/2015 09:42 PM, Victor Kaplansky wrote: @@ -3128,6 +3134,7 @@ struct virtio_net_config { u8 mac[6]; le16 status; le16 max_virtqueue_pairs

Re: [PATCH v2 2/2] virtio-net: add default_mtu configuration field

2015-08-16 Thread Jason Wang
On 08/16/2015 09:42 PM, Victor Kaplansky wrote: Sometimes it is essential for libvirt to be able to configure MTU on guest's NICs to a value different from 1500. The change adds a new field to configuration area of network devices. It will be used to pass initial MTU from the device to the

Re: [PATCH v2 1/2] virtio-net: rephrase devconf fields description

2015-08-16 Thread Jason Wang
On 08/16/2015 09:42 PM, Victor Kaplansky wrote: Clarify general description of the mac, status and max_virtqueue_pairs fields. Specifically, the old description is vague about configuration layout and fields offsets when some of the fields are non valid. Also clarify that validity of two

[PATCH net] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Jason Wang
only get what we can handle. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- The patch is needed for stable. --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net

[PATCH net V2] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Jason Wang
only get what we can handle. Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- - Change from V1: coding style fixes. - The patch is needed for stable. --- drivers/net/virtio_net.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers

Re: [PATCH net] virtio-net: drop NETIF_F_FRAGLIST

2015-08-04 Thread Jason Wang
On 08/04/2015 07:11 PM, Sergei Shtylyov wrote: Hello. On 8/4/2015 12:55 PM, Jason Wang wrote: virtio declares support for NETIF_F_FRAGLIST, but assumes that there are at most MAX_SKB_FRAGS + 2 fragments which isn't always true with a fraglist. A longer fraglist in the skb will make

Re: [Question]Why a skb with frag_list causes BUG_ON in function skb_segment

2015-07-29 Thread Jason Wang
cc netdev for more experts On 07/28/2015 04:53 PM, Zhangjie (HZ) wrote: Hi, I generate a skb as follows: It has a linear data region, 17 frags and the last fragment is in skb_shinfo(skb)-frag_list. Before this skb is sent to driver, dev_hard_start_xmit() will segment it first(skb has

Re: [PATCH RFC] tun, macvtap: higher order allocations for skbs

2015-06-29 Thread Jason Wang
On 06/29/2015 12:50 PM, Jason Wang wrote: On 06/18/2015 06:20 PM, Michael S. Tsirkin wrote: Needs more testing. Anyone see anything wrong with this? Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/net/macvtap.c | 2 +- drivers/net/tun.c | 2 +- 2 files changed, 2

Re: [PATCH RFC] tun, macvtap: higher order allocations for skbs

2015-06-28 Thread Jason Wang
On 06/18/2015 06:20 PM, Michael S. Tsirkin wrote: Needs more testing. Anyone see anything wrong with this? Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/net/macvtap.c | 2 +- drivers/net/tun.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git

<    5   6   7   8   9   10   11   >