]> git.itanic.dy.fi Git - linux-stable/commit
net/mlx5: DR, Calculate sync threshold of each pool according to its type
authorYevgeny Kliteynik <kliteyn@nvidia.com>
Tue, 8 Nov 2022 15:45:03 +0000 (17:45 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 21 Apr 2023 01:35:48 +0000 (18:35 -0700)
commit72b2cff68405e91ee5e772385b68eb4442bcbf43
tree5574ce696d2159a791972979fdbd925647d2d463
parent075056005d8cceecbbb8e054d8e3cd2b7519d9c6
net/mlx5: DR, Calculate sync threshold of each pool according to its type

When certain ICM chunk is no longer needed, it needs to be freed.
Fully freeing ICM memory involves issuing FW SYNC_STEERING command.
This is very time consuming, and it is impractical to do it for every
freed chunk.
Instead, we manage these 'freed' chunks in hot list (list of chunks
that are not required by SW any more, but HW might still access them).
When size of the hot list reaches certain threshold, we purge it and
issue SYNC_STEERING FW command.
There is one threshold for all the different ICM types, which is not
optimal, as different ICM types require different approach: STEs pool
is very large, and it is very 'dynamic' in its nature, so letting hot
list to become too large will result in a significant perf hiccup when
purging the hot list. Modify action is much smaller and less dynamic,
so we can let the hot list to grow to almost the size of the whole pool.

This patch fixes this problem: instead of having same hot memory
threshold for all the pools, sync operation will be triggered in
accordance with the ICM type.

Signed-off-by: Yevgeny Kliteynik <kliteyn@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/steering/dr_icm_pool.c