diff options
author | Maxim Mikityanskiy <maximmi@nvidia.com> | 2022-09-30 09:29:00 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-10-01 13:30:21 -0700 |
commit | ddb7afeee28bc37b4815470d00f0c8db3fcabd2e (patch) | |
tree | 1b81ba3b8dbe0dfe952bfd92618d3b2315c72b48 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 96d37d861a09ba4b6ea08b87fa1c173c1af522b1 (diff) | |
download | linux-ddb7afeee28bc37b4815470d00f0c8db3fcabd2e.tar.gz linux-ddb7afeee28bc37b4815470d00f0c8db3fcabd2e.tar.bz2 linux-ddb7afeee28bc37b4815470d00f0c8db3fcabd2e.zip |
net/mlx5e: Optimize RQ page deallocation
mlx5e_free_rx_mpwqe loops over all pages of a MPWQE, calling
mlx5e_page_release for ones that are not scheduled for XDP_TX or
XDP_REDIRECT; and mlx5e_page_release checks whether it's an XSK RQ or a
regular one for each page/XSK frame. This check can be moved outside the
loop to reduce the number of branches.
mlx5e_free_rx_wqe loops over all fragments, calling mlx5e_page_release
for the ones that are last in a page; and mlx5e_page_release checks
whether it's an XSK RQ or a regular one for each fragment. Using the
fact that XSK doesn't support multiple fragments, it can be optimized
for both XSK and regular usages:
1. Make an early check for XSK and call its deallocator directly, saving
3 branches (loop condition, frag->last_in_page and selection of
deallocator).
2. Call the regular deallocator directly in the non-XSK case, saving a
branch per fragment, except the first one.
After the changes, mlx5e_page_release is removed, as there are no
callers left.
Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions