HomeFreeBSD

tcp: For hostcache performance, use atomics instead of counters

Description

tcp: For hostcache performance, use atomics instead of counters

As accessing the tcp hostcache happens frequently on some
classes of servers, it was recommended to use atomic_add/subtract
rather than (per-CPU distributed) counters, which have to be
summed up at high cost to cache efficiency in a hot codepath.

PR: 254333
MFC after: 2 weeks
Sponsored by: NetApp, Inc.
Reviewed By: transport, tuexen, jtl
Differential Revision: https://reviews.freebsd.org/D29522

(cherry picked from commit 529a2a0f2765f6c57c50a5af6be242c03bf714e3)

Details

Provenance
rscheffAuthored on Apr 1 2021, 8:00 AM
Reviewer
transport
Differential Revision
D29522: tcp: For hostcache performance, use atomics instead of counters
Parents
rG632e3363087c: tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t
Branches
Unknown
Tags
Unknown