bianbu-linux-6.6/include/linux/mlx5
Avihai Horon b247f32aec net/mlx5: Dynamically resize flow counters query buffer
The flow counters bulk query buffer is allocated once during
mlx5_fc_init_stats(). For PFs and VFs this buffer usually takes a little
more than 512KB of memory, which is aligned to the next power of 2, to
1MB. For SFs, this buffer is reduced and takes around 128 Bytes.

The buffer size determines the maximum number of flow counters that
can be queried at a time. Thus, having a bigger buffer can improve
performance for users that need to query many flow counters.

There are cases that don't use many flow counters and don't need a big
buffer (e.g. SFs, VFs). Since this size is critical with large scale,
in these cases the buffer size should be reduced.

In order to reduce memory consumption while maintaining query
performance, change the query buffer's allocation scheme to the
following:
- First allocate the buffer with small initial size.
- If the number of counters surpasses the initial size, resize the
  buffer to the maximum size.

The buffer only grows and isn't shrank, because users with many flow
counters don't care about the buffer size and we don't want to add
resize overhead if the current number of counters drops.

This solution is preferable to the current one, which is less accurate
and only addresses SFs.

Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
2021-12-02 16:53:16 -08:00
..
accel.h net/mlx5: Accel, Add core IPsec support for the Connect-X family 2020-07-16 16:36:42 -07:00
cq.h
device.h Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into net-next 2021-10-27 21:33:28 -07:00
doorbell.h
driver.h net/mlx5: Dynamically resize flow counters query buffer 2021-12-02 16:53:16 -08:00
eq.h net/mlx5: remove the recent devlink params 2021-10-26 10:18:32 -07:00
eswitch.h net/mlx5: E-Switch, Fix resetting of encap mode when entering switchdev 2021-11-16 12:20:19 -08:00
fs.h net/mlx5: Allow skipping counter refresh on creation 2021-10-29 13:53:28 -07:00
fs_helpers.h
mlx5_ifc.h net/mlx5: Fix access to a non-supported register 2021-11-30 22:35:06 -08:00
mlx5_ifc_fpga.h
mlx5_ifc_vdpa.h vdpa/mlx5: Fix queue type selection logic 2021-08-11 06:44:43 -04:00
mpfs.h {net,vdpa}/mlx5: Configure interface MAC into mpfs L2 table 2021-05-18 23:01:48 -07:00
port.h net/mlx5: Add support for DSFP module EEPROM dumps 2021-04-11 16:34:56 -07:00
qp.h RDMA/mlx5: Refactor get_ts_format functions to simplify code 2021-06-22 09:35:16 +03:00
rsc_dump.h
transobj.h net/mlx5e: Fix page reclaim for dead peer hairpin 2021-06-09 17:20:03 -07:00
vport.h net/mlx5: E-Switch, Prepare to return total vports from eswitch struct 2021-04-24 00:58:43 -07:00