]> asedeno.scripts.mit.edu Git - linux.git/commit
Merge branch 'nfp-flower-speed-up-stats-update-loop'
authorDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2018 05:32:45 +0000 (22:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Oct 2018 05:32:45 +0000 (22:32 -0700)
commit1a21cc507bb75954bd8618f193179e2a3f8d9069
tree217eb7856b602cbd597a960cf376f34d2c62ae2b
parent7579d84be12c4645672deeac5bb0eace7dbd6cb5
parent12ecf61529dc51b4dd03a15bed34c7d317c137ae
Merge branch 'nfp-flower-speed-up-stats-update-loop'

Jakub Kicinski says:

====================
nfp: flower: speed up stats update loop

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

Signed-off-by: David S. Miller <davem@davemloft.net>