diff options
| author | Qingfang Deng <dqfext@gmail.com> | 2025-08-28 04:20:17 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2025-08-29 23:39:54 +0300 |
| commit | 4f54dff818d7b5b1d84becd5d90bc46e6233c0d7 (patch) | |
| tree | 1764ff07b3edcea77f8d941fc29aeebe2ae589d1 /tools/perf/scripts/python/event_analyzing_sample.py | |
| parent | 72cdc67e7fa74931b055df3a76852bab551f1a04 (diff) | |
| download | linux-4f54dff818d7b5b1d84becd5d90bc46e6233c0d7.tar.xz | |
pppoe: drop sock reference counting on fast path
Now that PPPoE sockets are freed via RCU (SOCK_RCU_FREE), it is no longer
necessary to take a reference count when looking up sockets on the receive
path. Readers are protected by RCU, so the socket memory remains valid
until after a grace period.
Convert fast-path lookups to avoid refcounting:
- Replace get_item() and sk_receive_skb() in pppoe_rcv() with
__get_item() and __sk_receive_skb().
- Rework get_item_by_addr() into __get_item_by_addr() (no refcount and
move RCU lock into pppoe_ioctl)
- Remove unnecessary sock_put() calls.
This avoids cacheline bouncing from atomic reference counting and improves
performance on the receive fast path.
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250828012018.15922-2-dqfext@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/event_analyzing_sample.py')
0 files changed, 0 insertions, 0 deletions
