linux/include
David S. Miller ddc9cc0131 mlx5e-updates-2018-09-05
This series provides updates to mlx5 ethernet driver.
 
 1) Starting with a four patches series to optimize flow counters updates,
 From Vlad Buslov:
 ==============================================
 
 By default mlx5 driver updates cached counters each second. Update function
 consumes noticeable amount of CPU resources. The goal of this patch series
 is to optimize update function.
 
 Investigation revealed following bottlenecks in fs counters
 implementation:
  1) Update code(scheduled each second) iterates over all counters twice.
  (first for finding and deleting counters that are marked for deletion,
  second iteration is for actually updating the counters)
  2) Counters are stored in rb tree. Linear iteration over all rb tree
  elements(rb_next in profiling data) consumed ~65% of time spent in
  update function.
 
 Following optimizations were implemented:
  1) Instead of just marking counters for deletion, store them in
  standalone list. This removes first iteration over whole counters tree.
  2) Store counters in sorted list to optimize traversing them and remove
  calls to rb_next.
 
 First implementation of these changes caused degradation of performance,
 instead of improving it. Investigation revealed that there first cache
 line of struct mlx5_fc is full and adding anything to it causes amount
 of cache misses to double. To mitigate that, following refactorings were
 implemented:
  - Change 'addlist' list type from double linked to single linked. This
  allowes to get free space for one additional pointer that is used to
  store deletion list(optimization 1)
  - Substitute rb tree with idr. Idr is non-intrusive data structure and
  doesn't require adding any new members to struct mlx5_fc. Use free
  space that became available for double linked sorted list that is used
  for traversing all counters. (optimization 2)
 
 Described changes reduced CPU time spent in mlx5_fc_stats_work from 70%
 to 44%. (global perf profile mode)
 ============================================
 
 The rest of the series are misc updates:
 
 2) From Kamal, Move mlx5e_priv_flags into en_ethtool.c, to avoid a
 compilation warning.
 
 3) From Roi Dayan, Move Q counters allocation and drop RQ to init_rx profile
 function to avoid allocating Q counters when not required.
 
 4) From Shay Agroskin, Replace PTP clock lock from RW lock to seq lock.
 Almost double the packet rate when timestamping is active on multiple TX
 queues.
 
 5) From: Natali Shechtman, set ECN for received packets using CQE indication.
 
 6) From: Alaa Hleihel, don't set CHECKSUM_COMPLETE on SCTP packets.
 CHECKSUM_COMPLETE is not applicable to SCTP protocol.
 -----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJbkKzcAAoJEEg/ir3gV/o+4bsIAKu61DsZZhJAXfwZ4JXI9fN7
 iZ9wOPbPovTrkfRfqatcCa3CBwxM1zZ6WzbVTGGieMsUnxjp4G+LAs7m8J+cmWB2
 GsxhO3lsF5iGTcEB5Q5a/TlWlUP0CiPcdNZZe6FvT2Vzil+mLAb3BZgIPKPgoyJW
 CmDhIOslfolBJC0s4fc+zVcWrShmKnUwHmVLhkOXpz8cfYBB1fBVGebRTZiYsvbf
 8CV4buiYx0Fuq9MSnOwaMuPrUP1IB6DweNbFpg9gRd0k4mmWnoNu3l+g1Flgmd88
 RtU4+5PEtZF2kNhH/LeiHRqkZ5f2cmOsIKbDZoX6xwzfYesws8jlDJpL5dIhxZA=
 =nxDw
 -----END PGP SIGNATURE-----

Merge tag 'mlx5e-updates-2018-09-05' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5e-updates-2018-09-05

This series provides updates to mlx5 ethernet driver.

1) Starting with a four patches series to optimize flow counters updates,
From Vlad Buslov:
==============================================

By default mlx5 driver updates cached counters each second. Update function
consumes noticeable amount of CPU resources. The goal of this patch series
is to optimize update function.

Investigation revealed following bottlenecks in fs counters
implementation:
 1) Update code(scheduled each second) iterates over all counters twice.
 (first for finding and deleting counters that are marked for deletion,
 second iteration is for actually updating the counters)
 2) Counters are stored in rb tree. Linear iteration over all rb tree
 elements(rb_next in profiling data) consumed ~65% of time spent in
 update function.

Following optimizations were implemented:
 1) Instead of just marking counters for deletion, store them in
 standalone list. This removes first iteration over whole counters tree.
 2) Store counters in sorted list to optimize traversing them and remove
 calls to rb_next.

First implementation of these changes caused degradation of performance,
instead of improving it. Investigation revealed that there first cache
line of struct mlx5_fc is full and adding anything to it causes amount
of cache misses to double. To mitigate that, following refactorings were
implemented:
 - Change 'addlist' list type from double linked to single linked. This
 allowes to get free space for one additional pointer that is used to
 store deletion list(optimization 1)
 - Substitute rb tree with idr. Idr is non-intrusive data structure and
 doesn't require adding any new members to struct mlx5_fc. Use free
 space that became available for double linked sorted list that is used
 for traversing all counters. (optimization 2)

Described changes reduced CPU time spent in mlx5_fc_stats_work from 70%
to 44%. (global perf profile mode)
============================================

The rest of the series are misc updates:

2) From Kamal, Move mlx5e_priv_flags into en_ethtool.c, to avoid a
compilation warning.

3) From Roi Dayan, Move Q counters allocation and drop RQ to init_rx profile
function to avoid allocating Q counters when not required.

4) From Shay Agroskin, Replace PTP clock lock from RW lock to seq lock.
Almost double the packet rate when timestamping is active on multiple TX
queues.

5) From: Natali Shechtman, set ECN for received packets using CQE indication.

6) From: Alaa Hleihel, don't set CHECKSUM_COMPLETE on SCTP packets.
CHECKSUM_COMPLETE is not applicable to SCTP protocol.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2018-09-06 15:42:04 -07:00
..
acpi
asm-generic Kbuild updates for v4.19 (2nd) 2018-08-25 13:40:38 -07:00
clocksource
crypto
drm
dt-bindings ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
keys
kvm
linux mlx5e-updates-2018-09-05 2018-09-06 15:42:04 -07:00
math-emu
media - New Drivers 2018-08-20 15:38:44 -07:00
memory
misc
net rtnetlink: add rtnl_get_net_ns_capable() 2018-09-05 22:27:11 -07:00
pcmcia pcmcia: remove long deprecated pcmcia_request_exclusive_irq() function 2018-08-18 12:30:42 -07:00
ras
rdma Second merge window update 2018-08-23 15:34:48 -07:00
scsi
soc
sound
target
trace Merge branch 'for-4.19' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2018-08-24 13:19:27 -07:00
uapi if_link: add IFLA_TARGET_NETNSID alias 2018-09-05 22:27:11 -07:00
video fbdev changes for v4.19: 2018-08-23 15:44:58 -07:00
xen Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2018-08-18 16:48:07 -07:00