diff options
author | Gerhard Engleder <gerhard@engleder-embedded.com> | 2023-04-21 21:46:51 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-04-24 18:22:38 -0700 |
commit | 42fb2962b4a6f8b46aa1c141748319e01d0c7c39 (patch) | |
tree | 3d661946f8721039e0bb21a0726dc9a3d989ab23 /tools/perf/scripts/python/task-analyzer.py | |
parent | 938f65adc4202da8ed3c85ef5a40dd3b8ee328d9 (diff) |
tsnep: Replace modulo operation with mask
TX/RX ring size is static and power of 2 to enable compiler to optimize
modulo operation to mask operation. Make this optimization already in
the code and don't rely on the compiler.
CPU utilisation during high packet rate has not changed. So no
performance improvement has been measured. But it is best practice to
prevent modulo operations.
Suggested-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions