All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	davem@davemloft.net, kvm@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	eric.dumazet@gmail.com, brouer@redhat.com
Subject: Re: [PATCH net-next V3 0/6] switch to use tx skb array in tun
Date: Thu, 30 Jun 2016 08:37:31 +0300	[thread overview]
Message-ID: <20160630083717-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1467258779-3539-1-git-send-email-jasowang@redhat.com>

On Thu, Jun 30, 2016 at 11:52:53AM +0800, Jason Wang wrote:
> Hi all:
> 
> This series tries to switch to use skb array in tun. This is used to
> eliminate the spinlock contention between producer and consumer. The
> conversion was straightforward: just introdce a tx skb array and use
> it instead of sk_receive_queue.
> 
> A minor issue is to keep the tx_queue_len behaviour, since tun used to
> use it for the length of sk_receive_queue. This is done through:
> 
> - add the ability to resize multiple rings at once to avoid handling
>   partial resize failure for mutiple rings.
> - add the support for zero length ring.
> - introduce a notifier which was triggered when tx_queue_len was
>   changed for a netdev.
> - resize all queues during the tx_queue_len changing.
> 
> Tests shows about 15% improvement on guest rx pps:
> 
> Before: ~1300000pps
> After : ~1500000pps

Series:

Acked-by: Michael S. Tsirkin <mst@redhat.com>


> Changes from V2:
> - add multiple rings resizing support for ptr_ring/skb_array
> - add zero length ring support
> - introdce a NETDEV_CHANGE_TX_QUEUE_LEN
> - drop new flags
> 
> Changes from V1:
> - switch to use skb array instead of a customized circular buffer
> - add non-blocking support
> - rename .peek to .peek_len
> - drop lockless peeking since test show very minor improvement
> 
> Jason Wang (5):
>   ptr_ring: support zero length ring
>   skb_array: minor tweak
>   skb_array: add wrappers for resizing
>   net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
>   tun: switch to use skb array for tx
> 
> Michael S. Tsirkin (1):
>   ptr_ring: support resizing multiple queues
> 
>  drivers/net/tun.c                | 138 ++++++++++++++++++++++++++++++++++++---
>  drivers/vhost/net.c              |  16 ++++-
>  include/linux/net.h              |   1 +
>  include/linux/netdevice.h        |   1 +
>  include/linux/ptr_ring.h         |  77 ++++++++++++++++++----
>  include/linux/skb_array.h        |  13 +++-
>  net/core/net-sysfs.c             |  15 ++++-
>  tools/virtio/ringtest/ptr_ring.c |   5 ++
>  8 files changed, 243 insertions(+), 23 deletions(-)
> 
> -- 
> 2.7.4

WARNING: multiple messages have this Message-ID (diff)
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Jason Wang <jasowang@redhat.com>
Cc: kvm@vger.kernel.org, eric.dumazet@gmail.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org, brouer@redhat.com,
	davem@davemloft.net
Subject: Re: [PATCH net-next V3 0/6] switch to use tx skb array in tun
Date: Thu, 30 Jun 2016 08:37:31 +0300	[thread overview]
Message-ID: <20160630083717-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <1467258779-3539-1-git-send-email-jasowang@redhat.com>

On Thu, Jun 30, 2016 at 11:52:53AM +0800, Jason Wang wrote:
> Hi all:
> 
> This series tries to switch to use skb array in tun. This is used to
> eliminate the spinlock contention between producer and consumer. The
> conversion was straightforward: just introdce a tx skb array and use
> it instead of sk_receive_queue.
> 
> A minor issue is to keep the tx_queue_len behaviour, since tun used to
> use it for the length of sk_receive_queue. This is done through:
> 
> - add the ability to resize multiple rings at once to avoid handling
>   partial resize failure for mutiple rings.
> - add the support for zero length ring.
> - introduce a notifier which was triggered when tx_queue_len was
>   changed for a netdev.
> - resize all queues during the tx_queue_len changing.
> 
> Tests shows about 15% improvement on guest rx pps:
> 
> Before: ~1300000pps
> After : ~1500000pps

Series:

Acked-by: Michael S. Tsirkin <mst@redhat.com>


> Changes from V2:
> - add multiple rings resizing support for ptr_ring/skb_array
> - add zero length ring support
> - introdce a NETDEV_CHANGE_TX_QUEUE_LEN
> - drop new flags
> 
> Changes from V1:
> - switch to use skb array instead of a customized circular buffer
> - add non-blocking support
> - rename .peek to .peek_len
> - drop lockless peeking since test show very minor improvement
> 
> Jason Wang (5):
>   ptr_ring: support zero length ring
>   skb_array: minor tweak
>   skb_array: add wrappers for resizing
>   net: introduce NETDEV_CHANGE_TX_QUEUE_LEN
>   tun: switch to use skb array for tx
> 
> Michael S. Tsirkin (1):
>   ptr_ring: support resizing multiple queues
> 
>  drivers/net/tun.c                | 138 ++++++++++++++++++++++++++++++++++++---
>  drivers/vhost/net.c              |  16 ++++-
>  include/linux/net.h              |   1 +
>  include/linux/netdevice.h        |   1 +
>  include/linux/ptr_ring.h         |  77 ++++++++++++++++++----
>  include/linux/skb_array.h        |  13 +++-
>  net/core/net-sysfs.c             |  15 ++++-
>  tools/virtio/ringtest/ptr_ring.c |   5 ++
>  8 files changed, 243 insertions(+), 23 deletions(-)
> 
> -- 
> 2.7.4

  parent reply	other threads:[~2016-06-30  5:38 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30  3:52 [PATCH net-next V3 0/6] switch to use tx skb array in tun Jason Wang
2016-06-30  3:52 ` Jason Wang
2016-06-30  3:52 ` [PATCH net-next V3 1/6] ptr_ring: support zero length ring Jason Wang
2016-06-30  3:52   ` Jason Wang
2016-06-30  3:52 ` [PATCH net-next V3 2/6] skb_array: minor tweak Jason Wang
2016-06-30  3:52   ` Jason Wang
2016-06-30  3:52 ` [PATCH net-next V3 3/6] ptr_ring: support resizing multiple queues Jason Wang
2016-06-30  3:52   ` Jason Wang
2016-06-30  3:52 ` [PATCH net-next V3 4/6] skb_array: add wrappers for resizing Jason Wang
2016-06-30  3:52   ` Jason Wang
2016-06-30  3:52 ` [PATCH net-next V3 5/6] net: introduce NETDEV_CHANGE_TX_QUEUE_LEN Jason Wang
2016-06-30  3:52   ` Jason Wang
2016-06-30  4:56   ` John Fastabend
2016-06-30  5:12     ` Jason Wang
2016-06-30  5:12       ` Jason Wang
2016-06-30  5:59       ` Jason Wang
2016-06-30  5:59         ` Jason Wang
2016-06-30  6:43         ` Jason Wang
2016-06-30  6:43           ` Jason Wang
2016-06-30  4:56   ` John Fastabend
2016-06-30  3:52 ` [PATCH net-next V3 6/6] tun: switch to use skb array for tx Jason Wang
2016-06-30  3:52   ` Jason Wang
2016-06-30  6:20   ` [PATCH] tun: fix semicolon.cocci warnings kbuild test robot
2016-06-30  6:20     ` kbuild test robot
2016-06-30  6:20   ` [PATCH net-next V3 6/6] tun: switch to use skb array for tx kbuild test robot
2016-06-30  6:20     ` kbuild test robot
2016-06-30  5:37 ` Michael S. Tsirkin [this message]
2016-06-30  5:37   ` [PATCH net-next V3 0/6] switch to use tx skb array in tun Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160630083717-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=brouer@redhat.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.