diff options
author | Jamal Hadi Salim <jhs@mojatatu.com> | 2023-12-08 16:28:41 -0300 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-12-11 18:52:56 -0800 |
commit | c5e2a973448d958feb7881e4d875eac59fdeff3d (patch) | |
tree | 30c9435b1e4a1b09a3e9d56b4ff57ecfcce452a3 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 70028b2e51c61d8dda0a31985978f4745da6a11b (diff) |
rtnl: add helper to check if rtnl group has listeners
As of today, rtnl code creates a new skb and unconditionally fills and
broadcasts it to the relevant group. For most operations this is okay
and doesn't waste resources in general.
When operations are done without the rtnl_lock, as in tc-flower, such
skb allocation, message fill and no-op broadcasting can happen in all
cores of the system, which contributes to system pressure and wastes
precious cpu cycles when no one will receive the built message.
Introduce this helper so rtnetlink operations can simply check if someone
is listening and then proceed if necessary.
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Victor Nogueira <victor@mojatatu.com>
Signed-off-by: Pedro Tammela <pctammela@mojatatu.com>
Link: https://lore.kernel.org/r/20231208192847.714940-2-pctammela@mojatatu.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions