netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/3] nfp: flower: speed up stats update loop
@ 2018-10-09  1:57 Jakub Kicinski
  2018-10-09  1:57 ` [PATCH net-next 1/3] nfp: flower: use rhashtable for flow caching Jakub Kicinski
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jakub Kicinski @ 2018-10-09  1:57 UTC (permalink / raw)
  To: davem; +Cc: netdev, oss-drivers, Jakub Kicinski

Hi!

This set from Pieter improves performance of processing FW stats
update notifications.  The FW seems to send those at relatively
high rate (roughly ten per second per flow), therefore if we want
to approach the million flows mark we have to be very careful
about our data structures.

We tried rhashtable for stat updates, but according to our experiments
rhashtable lookup on a u32 takes roughly 60ns on an Xeon E5-2670 v3.
Which translate to a hard limit of 16M lookups per second on this CPU,
and, according to perf record jhash and memcmp account for 60% of CPU
usage on the core handling the updates.

Given that our statistic IDs are already array indices, and considering
each statistic is only 24B in size, we decided to forego the use
of hashtables and use a directly indexed array.  The CPU savings are
considerable.

With the recent improvements in TC core and with our own bottlenecks
out of the way Pieter removes the artificial limit of 128 flows, and
allows the driver to install as many flows as FW supports.

Pieter Jansen van Vuuren (3):
  nfp: flower: use rhashtable for flow caching
  nfp: flower: use stats array instead of storing stats per flow
  nfp: flower: use host context count provided by firmware

 drivers/net/ethernet/netronome/nfp/bpf/main.c |   5 -
 .../net/ethernet/netronome/nfp/flower/main.c  |  15 +-
 .../net/ethernet/netronome/nfp/flower/main.h  |  23 +--
 .../ethernet/netronome/nfp/flower/metadata.c  | 145 ++++++++++++------
 .../ethernet/netronome/nfp/flower/offload.c   |  31 ++--
 drivers/net/ethernet/netronome/nfp/nfp_app.c  |   5 +
 drivers/net/ethernet/netronome/nfp/nfp_app.h  |   1 +
 7 files changed, 148 insertions(+), 77 deletions(-)

-- 
2.17.1

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

end of thread, other threads:[~2018-10-11 12:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-09  1:57 [PATCH net-next 0/3] nfp: flower: speed up stats update loop Jakub Kicinski
2018-10-09  1:57 ` [PATCH net-next 1/3] nfp: flower: use rhashtable for flow caching Jakub Kicinski
2018-10-09  1:57 ` [PATCH net-next 2/3] nfp: flower: use stats array instead of storing stats per flow Jakub Kicinski
2018-10-09  1:57 ` [PATCH net-next 3/3] nfp: flower: use host context count provided by firmware Jakub Kicinski
2018-10-10 13:40 ` [PATCH net-next 0/3] nfp: flower: speed up stats update loop Or Gerlitz
2018-10-10 15:08   ` Jakub Kicinski
2018-10-11  5:33 ` David Miller

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