netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Davide Caratti <dcaratti@redhat.com>
To: Cong Wang <xiyou.wangcong@gmail.com>,
	Jiri Pirko <jiri@mellanox.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [PATCH net-next 0/2] net/sched: remove spinlock from 'csum' action
Date: Wed, 13 Dec 2017 10:48:36 +0100	[thread overview]
Message-ID: <cover.1513104506.git.dcaratti@redhat.com> (raw)

Similarly to what has been done earlier with other actions [1][2], this
series tries to improve the performance of 'csum' tc action, removing a
spinlock in the data plane. Patch 1 lets act_csum use per-CPU counters;
patch 2 removes spin_{,un}lock_bh() calls from act() method.

test procedure:

 # ip link add name eth1 type dummy
 # ip link set dev eth1 up
 # tc qdisc add dev eth1 root handle 1: prio
 # tc filter add dev eth1 parent 1: matchall action csum udp
 # for n in 2 4 6 8 10 12 14 16; do
 > ./pktgen_bench_xmit_mode_queue_xmit.sh -v -s 64 -t $n -n 1000000 -i eth1
 > done

test results:

 $n |  avg. pps/core  | avg. pps/core | delta
    | (without patch) | (with patch)  |  (%)
 ---+-----------------+---------------+------
  2 |          484915 |        547716 |   13
  4 |          209551 |        254439 |   21
  6 |          143901 |        164695 |   14
  8 |          112423 |        127821 |   14
 10 |           91134 |        102950 |   13
 12 |           75374 |         85499 |   13
 14 |           64586 |         73426 |   14
 16 |           56635 |         64111 |   13

references:

[1] http://www.spinics.net/lists/netdev/msg334760.html
[2] https://www.spinics.net/lists/netdev/msg465862.html

Davide Caratti (2):
  net/sched: act_csum: use per-core statistics
  net/sched: act_csum: don't use spinlock in the fast path

 net/sched/act_csum.c | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

-- 
2.13.6

             reply	other threads:[~2017-12-13  9:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-13  9:48 Davide Caratti [this message]
2017-12-13  9:48 ` [PATCH net-next 1/2] net/sched: act_csum: use per-core statistics Davide Caratti
2017-12-13  9:48 ` [PATCH net-next 2/2] net/sched: act_csum: don't use spinlock in the fast path Davide Caratti
2017-12-13 21:23   ` David Miller
2017-12-22  9:28     ` Davide Caratti

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=cover.1513104506.git.dcaratti@redhat.com \
    --to=dcaratti@redhat.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.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 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).