netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
	Hannes Frederic Sowa <hannes@stressinduktion.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Greg Kurz <gkurz@linux.vnet.ibm.com>,
	Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH RFC 0/2] tun: lockless xmit
Date: Wed, 13 Apr 2016 14:08:50 +0300	[thread overview]
Message-ID: <20160413132816-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <cover.1460393493.git.pabeni@redhat.com>

On Wed, Apr 13, 2016 at 11:04:45AM +0200, Paolo Abeni wrote:
> This patch series try to remove the need for any lock in the tun device
> xmit path, significantly improving the forwarding performance when multiple
> processes are accessing the tun device (i.e. in a nic->bridge->tun->vm scenario).
> 
> The lockless xmit is obtained explicitly setting the NETIF_F_LLTX feature bit
> and removing the default qdisc.
> 
> Unlikely most virtual devices, the tun driver has featured a default qdisc
> for a long period, but it already lost such feature in linux 4.3.

Thanks -  I think it's a good idea to reduce the
lock contention there.

But I think it's unfortunate that it requires
bypassing the qdisc completely: this means
that anyone trying to do traffic shaping will
get back the contention.

Can we solve the lock contention for qdisc?
E.g. add a small lockless queue in front of it,
whoever has the qdisc lock would be
responsible for moving things from there to qdisc
proper.

Thoughts? Is there a chance this might work reasonably well?


> Paolo Abeni (2):
>   tun: don't require serialization lock on tx
>   tun: don't set a default qdisc
> 
>  drivers/net/tun.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> -- 
> 1.8.3.1

  parent reply	other threads:[~2016-04-13 11:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13  9:04 [PATCH RFC 0/2] tun: lockless xmit Paolo Abeni
2016-04-13  9:04 ` [PATCH RFC 1/2] tun: don't require serialization lock on tx Paolo Abeni
2016-04-13  9:41   ` Michael S. Tsirkin
2016-04-13  9:48     ` Hannes Frederic Sowa
2016-04-13 12:57       ` Michael S. Tsirkin
2016-04-13 13:27         ` Eric Dumazet
2016-04-13 13:54           ` Michael S. Tsirkin
2016-04-13 14:39             ` Eric Dumazet
2016-04-13 12:52   ` Eric Dumazet
2016-04-13 14:26   ` Sergei Shtylyov
2016-04-14  6:50   ` Jason Wang
2016-04-14 10:27   ` Hannes Frederic Sowa
2016-04-13  9:04 ` [PATCH RFC 2/2] tun: don't set a default qdisc Paolo Abeni
2016-04-13 10:26   ` Michael S. Tsirkin
2016-04-13 15:22     ` David Miller
2016-04-14  6:49     ` Jason Wang
2016-04-14  9:05       ` Michael S. Tsirkin
2016-04-14  9:07         ` Jason Wang
2016-04-14  9:10           ` Michael S. Tsirkin
2016-04-14  9:21             ` Jason Wang
2016-04-14 10:01               ` Michael S. Tsirkin
2016-04-14 10:09                 ` Hannes Frederic Sowa
2016-04-13 11:08 ` Michael S. Tsirkin [this message]
2016-04-13 12:50   ` [PATCH RFC 0/2] tun: lockless xmit Eric Dumazet
2016-04-13 12:56     ` Michael S. Tsirkin
2016-04-13 13:09       ` Eric Dumazet
2016-04-13 13:17         ` Michael S. Tsirkin
2016-04-13 13:43           ` Eric Dumazet
2016-04-13 16:42             ` Eric Dumazet

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=20160413132816-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=davem@davemloft.net \
    --cc=ebiederm@xmission.com \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=hannes@stressinduktion.org \
    --cc=jasowang@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).