netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC Patch net-next 0/4] net_sched: make ingress filters lockless
@ 2014-01-09 18:19 Cong Wang
  2014-01-09 18:19 ` [RFC Patch net-next 1/4] net_sched: switch filter list to list_head Cong Wang
                   ` (3 more replies)
  0 siblings, 4 replies; 19+ messages in thread
From: Cong Wang @ 2014-01-09 18:19 UTC (permalink / raw)
  To: netdev
  Cc: Cong Wang, John Fastabend, Eric Dumazet, David S. Miller,
	Jamal Hadi Salim

This patch tries to switch filter list to using struct
list_head, so that on the read side, the list can be traversed
with RCU read lock. Same for actions.

I hope either on egress or ingress classify is already protected by RCU
read lock, but I don't pretend I fully understanding qdisc locking.

Also, I am not sure I use RCU API's correctly at all. At least
I don't see any warning with CONFIG_PROVE_RCU=y.

Without this patch, the spin_lock easily appears on the top of
my perf top with 4 netperf sessions (4 is the number of CPU)
and with 1000 u32 filters on ingress.

Question 1:
Am I still missing something on qdisc locking?

Question 2:
Is it okay to call qdisc_bstats_update() without any lock?

Please comment.

Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>

Cong Wang (4):
  net_sched: switch filter list to list_head
  net_sched: avoid holding qdisc lock for filters
  net_sched: use RCU for tc actions traverse
  net_sched: make ingress qdisc lockless

 include/net/pkt_cls.h     | 25 ++++--------------------
 include/net/pkt_sched.h   |  4 ++--
 include/net/sch_generic.h | 14 +++++++++-----
 net/core/dev.c            |  2 --
 net/sched/act_api.c       | 12 +++++++-----
 net/sched/cls_api.c       | 48 ++++++++++++++++++++++++++++-------------------
 net/sched/sch_api.c       | 35 +++++++++++++++++++++-------------
 net/sched/sch_atm.c       | 14 +++++++-------
 net/sched/sch_cbq.c       |  9 +++++----
 net/sched/sch_choke.c     | 11 ++++++-----
 net/sched/sch_drr.c       |  7 ++++---
 net/sched/sch_dsmark.c    |  7 ++++---
 net/sched/sch_fq_codel.c  |  9 +++++----
 net/sched/sch_hfsc.c      | 15 +++++++++------
 net/sched/sch_htb.c       | 20 ++++++++++++--------
 net/sched/sch_ingress.c   | 14 +++++++++++---
 net/sched/sch_multiq.c    |  7 ++++---
 net/sched/sch_prio.c      |  9 +++++----
 net/sched/sch_qfq.c       |  7 ++++---
 net/sched/sch_sfb.c       |  9 +++++----
 net/sched/sch_sfq.c       | 11 ++++++-----
 21 files changed, 160 insertions(+), 129 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-01-12 12:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-01-10  1:09         ` Cong Wang
2014-01-10  1:11       ` Eric Dumazet
2014-01-10  1:21         ` Cong Wang

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).