diff options
| author | Shay Drory <shayd@nvidia.com> | 2026-09-15 14:34:57 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-09-17 17:54:31 -0700 |
| commit | d09e8f64653c93da5793c16be19330968f2a32e6 (patch) | |
| tree | 6a393741bff1caa976d846937d86a2520da0dde6 /tools/perf/scripts/python/stackcollapse.py | |
| parent | 39c6580765dad6477fb2637f6f616e0d276aae65 (diff) | |
| download | linux-d09e8f64653c93da5793c16be19330968f2a32e6.tar.gz linux-d09e8f64653c93da5793c16be19330968f2a32e6.zip | |
net/mlx5: devcom, Base component size on linked devices
mlx5_devcom_comp_get_size() returns the component's kref count. That
kref is bumped in mlx5_devcom_register_component() under comp_list_lock,
before the comp_dev is linked onto comp_dev_list_head under comp->sem.
The event broadcast (mlx5_devcom_locked_send_event()) walks that list.
Hence, a caller can read the expected size, but send_event won't be sent
to all peers. In the SD group registration path, this lets a member
broadcast its role-election event over an incomplete list, electing a
primary that never completes the group, is never marked ready, and
leaves the group with a stale primary.
Track the number of linked comp_devs in a dedicated counter, maintained
under comp->sem together with the list add/remove, and return it from
mlx5_devcom_comp_get_size().
Fixes: 9bb1ac80738a ("net/mlx5: devcom, Add component size getter")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Reviewed-by: Akiva Goldberger <agoldberger@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Link: https://patch.msgid.link/20260915113459.3934760-2-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
