diff options
author | Vladyslav Tarasiuk <vladyslavt@mellanox.com> | 2020-07-10 15:25:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-11 00:32:02 +0300 |
commit | 3c5584bf0a0493e8d232ade65f4b9c5e995f3a0c (patch) | |
tree | 0f400f9ec0b31b4f3a7d5f40d6da03159568ecee /tools/perf/scripts/python/stackcollapse.py | |
parent | c57544b3dec4480c1b455a43f18be5ec91ab3136 (diff) | |
download | linux-3c5584bf0a0493e8d232ade65f4b9c5e995f3a0c.tar.xz |
devlink: Rework devlink health reporter destructor
Devlink keeps its own reference to every reporter in a list and inits
refcount to 1 upon reporter's creation. Existing destructor waits to
free the memory indefinitely using msleep() until all references except
devlink's own are put.
Rework this mechanism by moving memory free routine to a separate
function, which is called when the last reporter reference is put.
Besides, it allows to call __devlink_health_reporter_destroy() while
locked on a reporters list mutex in symmetry to
__devlink_health_reporter_create(), which is required in follow-up
patch.
Signed-off-by: Vladyslav Tarasiuk <vladyslavt@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions