From: Jamal Hadi Salim <jhs@mojatatu.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: John Fastabend <john.r.fastabend@intel.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Eric Dumazet <eric.dumazet@gmail.com>,
Linux Kernel Network Developers <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [RFC Patch net-next] net_sched: make classifying lockless on ingress
Date: Sun, 22 Dec 2013 11:01:06 -0500 [thread overview]
Message-ID: <52B70CC2.9080805@mojatatu.com> (raw)
In-Reply-To: <52B61FA3.9050904@gmail.com>
On 12/21/13 18:09, John Fastabend wrote:
>
> I solved this by making them per CPU and synchronizing when I hit
> an operation that required sync'ing them. Going forward if folks
> have the time to write SMP aware qdisc's that work with eventually
> consistent counters that would be great.
>
I think what you describe is reasonable as well. Need to weigh pro/con
of both.
> You could make this fully generic by having a classifer to match
> the cpu id and then forwarding the skb to a qdisc based on the
> cpu_id.
>
Indeed. More a "generic stateless metadata" classifier which may
look at more than just cpu id to make the systolic decision.
Probably at pre-enqueu that you had.
I would assume the amount of config update on such a table would be
very very minimal - so RCU would do well.
If someone wants more deeper lookup, then a tc classifier would make
more sense. But by default the generic stateless classifier maybe
sufficient.
> Then per-netdev-ingress-per-cpu is really just a configured policy.
> If we wanted to make it the default configuration that would be
> fine.
>
Perhaps thats just defensive talk on my part when people say "qdiscs
are slow". No - netdevs are slow. Rephrase: Netdevs are shared across
CPUs, you MUST lock. Locks create cache misses etc.
As an example, I dont know why something like RPS could not have
benefited from the rich classifier-action if someone wanted it to.
So there may still be need for per-netdev-ingress-per-cpu.
cheers,
jamal
next prev parent reply other threads:[~2013-12-22 16:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 23:28 [RFC Patch net-next] net_sched: make classifying lockless on ingress Cong Wang
2013-12-20 23:49 ` Eric Dumazet
2013-12-20 23:57 ` Cong Wang
2013-12-21 0:08 ` Eric Dumazet
2013-12-21 0:24 ` Cong Wang
2013-12-21 2:32 ` John Fastabend
2013-12-21 22:11 ` Jamal Hadi Salim
2013-12-21 23:09 ` John Fastabend
2013-12-22 16:01 ` Jamal Hadi Salim [this message]
2013-12-24 0:56 ` Cong Wang
2013-12-24 6:08 ` John Fastabend
2013-12-26 12:02 ` Jamal Hadi Salim
2013-12-21 1:09 ` John Fastabend
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=52B70CC2.9080805@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=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.