All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamal Hadi Salim <jhs@mojatatu.com>
To: John Fastabend <john.r.fastabend@intel.com>,
	Cong Wang <xiyou.wangcong@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Linux Kernel Network Developers <netdev@vger.kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC Patch net-next 4/4] net_sched: make ingress qdisc lockless
Date: Sun, 12 Jan 2014 07:30:14 -0500	[thread overview]
Message-ID: <52D28AD6.4080304@mojatatu.com> (raw)
In-Reply-To: <52CF4795.106@intel.com>

On 01/09/14 20:06, John Fastabend wrote:

> Just to re-iterate you need to go through each and every qdisc,
> classifier, action and verify it is safe to run in parallel. Take
> a look at how the skb lists are managed in the qdiscs. If we want
> to do this we need to make these changes in some coherent way
> because it touches lots of pieces.
>

Indeed. Everything assumes the global qdisc lock is protecting them.
Actually actions are probably the best at the moment because
the lock is very fine grained to just the action instance
and it protects both control and data paths.
But filters have stuff littered everywhere.  Egress qdiscs
as you mention have queues at multi levels etc.

> Also your stats are going to get hosed none of the bstats, qstats
> supports this.

Stats are probably the easiest to "fix".
Didnt Eric (or somebody else) fix netdev level stats to use seq counts?
Would that idea not be applicable here?

>I'll send out the classifier set later tonight
> if you want. I got stalled going through the actions.
>

The thing to note is:
actions can be shared across filters, netdevices and cpus.
By default they are not shared across filters and netdevices that is
a config option. You still have to worry about sharing across cpus
which will happen because a flow can be shared across cpus.
You could probably get rid of the lock if you can show
that you can make data and control path mutually exclusive
(rtnl will protect control path).

> Finally any global state in those qdiscs is going to drive performance
> down so many of them would likely need to be redesigned.
>

I feel like per-cpu qdiscs is the best surgery at the moment.

cheers,
jamal

  reply	other threads:[~2014-01-12 12:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 18:19 [RFC Patch net-next 0/4] net_sched: make ingress filters lockless Cong Wang
2014-01-09 18:19 ` [RFC Patch net-next 1/4] net_sched: switch filter list to list_head Cong Wang
2014-01-10  0:17   ` Eric Dumazet
2014-01-10  0:20     ` Cong Wang
2014-01-10  3:48   ` John Fastabend
2014-01-10  4:10     ` Cong Wang
2014-01-09 18:19 ` [RFC Patch net-next 2/4] net_sched: avoid holding qdisc lock for filters Cong Wang
2014-01-10  3:13   ` John Fastabend
2014-01-09 18:19 ` [RFC Patch net-next 3/4] net_sched: use RCU for tc actions traverse Cong Wang
2014-01-10  4:03   ` John Fastabend
2014-01-09 18:19 ` [RFC Patch net-next 4/4] net_sched: make ingress qdisc lockless Cong Wang
2014-01-10  0:21   ` Eric Dumazet
2014-01-10  0:30     ` Cong Wang
2014-01-10  0:49       ` Stephen Hemminger
2014-01-10  1:06         ` John Fastabend
2014-01-12 12:30           ` Jamal Hadi Salim [this message]
2014-01-10  1:09         ` Cong Wang
2014-01-10  1:11       ` Eric Dumazet
2014-01-10  1:21         ` Cong Wang

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=52D28AD6.4080304@mojatatu.com \
    --to=jhs@mojatatu.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=john.fastabend@gmail.com \
    --cc=john.r.fastabend@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=xiyou.wangcong@gmail.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 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.