]> git.karo-electronics.de Git - karo-tx-linux.git/commit
net/mlx5e: Added BW check for DIM decision mechanism
authorTal Gilboa <talgi@mellanox.com>
Mon, 15 May 2017 11:13:16 +0000 (14:13 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 11 Jun 2017 10:10:36 +0000 (13:10 +0300)
commitc3164d2fc48fd4fa0477ab658b644559c3fe9073
treecc73863d662e8e8063977c3d0c6e60109c19e588
parentf729860a177d097ac44321fb2f7d927a0c54c5a3
net/mlx5e: Added BW check for DIM decision mechanism

DIM (Dynamically-tuned Interrupt Moderation) is a mechanism designed for
changing the channel interrupt moderation values in order to reduce CPU
overhead for all traffic types.
Until now only interrupt and packet rate were sampled.
We found a scenario on which we get a false indication since a change in
DIM caused more aggregation and reduced packet rate while increasing BW.

We now regard a change as succesfull iff:
current_BW > (prev_BW + threshold) or
current_BW ~= prev_BW and current_PR > (prev_PR + threshold) or
current_BW ~= prev_BW and current_PR ~= prev_PR and
    current_IR < (prev_IR - threshold)
Where BW = Bandwidth, PR = Packet rate and IR = Interrupt rate

Improvements (ConnectX-4Lx 25GbE, single RX queue, LRO off)
    --------------------------------------------------
    packet size | before[Mb/s] | after[Mb/s] | gain  |
    2B          | 343.4        | 359.4       |  4.5% |
    16B         | 2739.7       | 2814.8      |  2.7% |
    64B         | 9739         | 10185.3     |  4.5% |

Fixes: cb3c7fd4f839 ("net/mlx5e: Support adaptive RX coalescing")
Signed-off-by: Tal Gilboa <talgi@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_rx_am.c