aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorYevgeny Kliteynik <[email protected]>2025-07-03 18:54:30 +0000
committerJakub Kicinski <[email protected]>2025-07-08 02:12:17 +0000
commit96e4c4a1a5bc6b6bc1ba48c6dfd2246df24f2f63 (patch)
treef1d98ce8212637c1d806d6bd9ecf7a727b03d69e /net/unix/af_unix.c
parentnet/mlx5: HWS, Rearrange to prevent forward declaration (diff)
downloadkernel-96e4c4a1a5bc6b6bc1ba48c6dfd2246df24f2f63.tar.gz
kernel-96e4c4a1a5bc6b6bc1ba48c6dfd2246df24f2f63.zip
net/mlx5: HWS, Shrink empty matchers
Matcher size is dynamic: it starts at initial size, and then it grows through rehash as more and more rules are added to this matcher. When rules are deleted, matcher's size is not decreased. Rehash approach is greedy. The idea is: if the matcher got to a certain size at some point, chances are - it will get to this size again, so it is better to avoid costly rehash operations whenever possible. However, when all the rules of the matcher are deleted, this should be viewed as special case. If the matcher actually got to the point where it has zero rules, it might be an indication that some usecase from the past is no longer happening. This is where some ICM can be freed. This patch handles this case: when a number of rules in a matcher goes down to zero, the matcher's tables are shrunk to the initial size. Signed-off-by: Yevgeny Kliteynik <[email protected]> Reviewed-by: Vlad Dogaru <[email protected]> Signed-off-by: Mark Bloch <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
0 files changed, 0 insertions, 0 deletions