aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorCosmin Ratiu <cratiu@nvidia.com>2024-10-01 13:37:08 +0300
committerJakub Kicinski <kuba@kernel.org>2024-10-04 11:33:46 -0700
commit4a67ebf85f384853970c56099bfc3096f66c20ed (patch)
tree5c0d702a58c6fe4520e24953aff02de72876363b /net/socket.c
parentnet/mlx5: hw counters: Drop unneeded cacheline alignment (diff)
downloadlinux-rng-4a67ebf85f384853970c56099bfc3096f66c20ed.tar.xz
linux-rng-4a67ebf85f384853970c56099bfc3096f66c20ed.zip
net/mlx5: hw counters: Don't maintain a counter count
num_counters is only used for deciding whether to grow the bulk query buffer, which is done once more counters than a small initial threshold are present. After that, maintaining num_counters serves no purpose. This commit replaces that with an actual xarray traversal to count the counters. This appears expensive at first sight, but is only done when the number of counters is less than the initial threshold (8) and only once every sampling interval. Once the number of counters goes above the threshold, the bulk query buffer is grown to max size and the xarray traversal is never done again. Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20241001103709.58127-6-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/socket.c')
0 files changed, 0 insertions, 0 deletions