diff options
| author | Jason Xing <[email protected]> | 2024-04-12 03:07:18 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2024-04-15 09:34:59 +0000 |
| commit | 4d0470b9ad73e965f5a1e52f1deb0edbb6d03c89 (patch) | |
| tree | 568b10f31df6dc8bba09d9ad235b4e43136bc825 /tools/testing/selftests/net/lib/py/nsim.py | |
| parent | Merge branch 'flower-control-flags' (diff) | |
| download | kernel-4d0470b9ad73e965f5a1e52f1deb0edbb6d03c89.tar.gz kernel-4d0470b9ad73e965f5a1e52f1deb0edbb6d03c89.zip | |
net: save some cycles when doing skb_attempt_defer_free()
Normally, we don't face these two exceptions very often meanwhile
we have some chance to meet the condition where the current cpu id
is the same as skb->alloc_cpu.
One simple test that can help us see the frequency of this statement
'cpu == raw_smp_processor_id()':
1. running iperf -s and iperf -c [ip] -P [MAX CPU]
2. using BPF to capture skb_attempt_defer_free()
I can see around 4% chance that happens to satisfy the statement.
So moving this statement at the beginning can save some cycles in
most cases.
Signed-off-by: Jason Xing <[email protected]>
Reviewed-by: Alexander Lobakin <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'tools/testing/selftests/net/lib/py/nsim.py')
0 files changed, 0 insertions, 0 deletions
