Revision tags: release/14.2.0 |
|
#
b80c06cc |
| 21-Nov-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: use const argument in the TCP hostcache KPI
The hostcache can't modify tcpcb, inpcb or connection info.
|
#
09000cc1 |
| 21-Nov-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp: mechanically rename hostcache metrics structure fields
Use hc_ prefix instead of rmx_. The latter stands for "route metrix" and is an artifact from the 90-ies, when TCP caching was embedded in
tcp: mechanically rename hostcache metrics structure fields
Use hc_ prefix instead of rmx_. The latter stands for "route metrix" and is an artifact from the 90-ies, when TCP caching was embedded into the routing table. The rename should have happened back in 97d8d152c28bb.
No functional change. Done with sed(1) command:
s/rmx_(mtu|ssthresh|rtt|rttvar|cwnd|sendpipe|recvpipe|granularity|expire|q|hits|updates)/hc_\1/g
show more ...
|
Revision tags: release/13.4.0, release/14.1.0 |
|
#
b6b4ac2f |
| 07-May-2024 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: remove unnecessary socketvar.h
|
Revision tags: release/13.3.0, release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
Revision tags: release/13.2.0, release/12.4.0, release/13.1.0, release/12.3.0 |
|
#
b4aa9cb2 |
| 30-Nov-2021 |
Gordon Bergling <gbe@FreeBSD.org> |
tcp(4): Fix a typo in a sysctl description
- s/entires/entries/
MFC after: 3 days
|
Revision tags: release/13.0.0 |
|
#
d554522f |
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: use SMR for lookups, mutex(9) for updates.
In certain cases, e.g. a SYN-flood from a limited set of hosts, the TCP hostcache becomes the main contention point. To solve that, this cha
tcp_hostcache: use SMR for lookups, mutex(9) for updates.
In certain cases, e.g. a SYN-flood from a limited set of hosts, the TCP hostcache becomes the main contention point. To solve that, this change introduces lockless lookups on the hostcache.
The cache remains a hash, however buckets are now CK_SLIST. For updates a bucket mutex is obtained, for read an SMR section is entered.
Reviewed by: markj, rscheff Differential revision: https://reviews.freebsd.org/D29729
show more ...
|
#
faa9ad8a |
| 20-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Fix off-by-one error in KASSERT from 02f26e98c7f4.
|
#
1a7fe55a |
| 09-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: make THC_LOCK/UNLOCK macros to work with hash head pointer. Not a functional change.
|
#
4f49e338 |
| 08-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: style(9)
Reviewed by: rscheff
|
#
7c71f3bd |
| 08-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: remove extraneous check. All paths leading here already checked this setting.
Reviewed by: rscheff
|
#
0c25bf7e |
| 08-Apr-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: implement tcp_hc_updatemtu() via tcp_hc_update. Locking changes are planned here, and without this change too much copy-and-paste would be between these two functions.
Reviewed by: rs
tcp_hostcache: implement tcp_hc_updatemtu() via tcp_hc_update. Locking changes are planned here, and without this change too much copy-and-paste would be between these two functions.
Reviewed by: rscheff
show more ...
|
#
b878ec02 |
| 08-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Use jenkins_hash32() in hostcache
As other parts of the base tcp stack (eg. tcp fastopen) already use jenkins_hash32, and the properties appear reasonably good, switching to use that.
Reviewed
tcp: Use jenkins_hash32() in hostcache
As other parts of the base tcp stack (eg. tcp fastopen) already use jenkins_hash32, and the properties appear reasonably good, switching to use that.
Reviewed By: tuexen, #transport, ae MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29515
show more ...
|
#
373ffc62 |
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache.c: remove unneeded includes.
Reviewed by: rscheff
|
#
29acb543 |
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: add bool argument for tcp_hc_lookup() to tell are we looking to only read from the result, or to update it as well. For now doesn't affect locking, but allows to push stats and expire
tcp_hostcache: add bool argument for tcp_hc_lookup() to tell are we looking to only read from the result, or to update it as well. For now doesn't affect locking, but allows to push stats and expire update into single place.
Reviewed by: rscheff
show more ...
|
#
489bde57 |
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
tcp_hostcache: hide rmx_hits/rmx_updates under ifdef.
They have little value unless you do some profiling investigations, but they are performance bottleneck.
Reviewed by: rscheff
|
#
2cca4c0e |
| 22-Mar-2021 |
Gleb Smirnoff <glebius@FreeBSD.org> |
Remove tcp_hostcache.h. Everything is private.
Reviewed by: rscheff
|
#
a04906f0 |
| 02-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
fix typo in 38ea2bd0698e
|
#
38ea2bd0 |
| 02-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
Use sbuf_drain unconditionally
After making sbuf_drain safe for external use, there is no need to protect the call.
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Dif
Use sbuf_drain unconditionally
After making sbuf_drain safe for external use, there is no need to protect the call.
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29545
show more ...
|
#
9aef4e7c |
| 01-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Shouldn't drain empty sbuf
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29524
|
#
02f26e98 |
| 01-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Add hash histogram output and validate bucket length accounting
Provide a histogram output to check, if the hashsize or bucketlimit could be optimized. Also add some basic sanity checks around
tcp: Add hash histogram output and validate bucket length accounting
Provide a histogram output to check, if the hashsize or bucketlimit could be optimized. Also add some basic sanity checks around the accounting of the hash utilization.
MFC after: 2 weeks Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29506
show more ...
|
#
529a2a0f |
| 01-Apr-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
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 tha
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.
PR: 254333 MFC after: 2 weeks Sponsored by: NetApp, Inc. Reviewed By: #transport, tuexen, jtl Differential Revision: https://reviews.freebsd.org/D29522
show more ...
|
#
95e56d31 |
| 31-Mar-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t
Addressing the underlying root cause for cache_count to show unexpectedly high values, by protecting all arithmetic on that global v
tcp: Make hostcache.cache_count MPSAFE by using a counter_u64_t
Addressing the underlying root cause for cache_count to show unexpectedly high values, by protecting all arithmetic on that global variable by using counter(9).
PR: 254333 Reviewed By: tuexen, #transport MFC after: 2 weeks Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29510
show more ...
|
#
86988046 |
| 31-Mar-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: drain tcp_hostcache_list in between per-bucket locks
Explicitly drain the sbuf after completing each hash bucket to minimize the work performed while holding the hash bucket lock.
PR: 254333
tcp: drain tcp_hostcache_list in between per-bucket locks
Explicitly drain the sbuf after completing each hash bucket to minimize the work performed while holding the hash bucket lock.
PR: 254333 MFC after: 2 weeks Reviewed By: tuexen, jhb, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29483
show more ...
|
#
cb0dd7e1 |
| 28-Mar-2021 |
Richard Scheffenegger <rscheff@FreeBSD.org> |
tcp: reduce memory footprint when listing tcp hostcache
In tcp_hostcache_list, the sbuf used would need a large (~2MB) blocking allocation of memory (M_WAITOK), when listing a full hostcache. This m
tcp: reduce memory footprint when listing tcp hostcache
In tcp_hostcache_list, the sbuf used would need a large (~2MB) blocking allocation of memory (M_WAITOK), when listing a full hostcache. This may stall the requestor for an indeterminate time.
A further optimization is to return the expected userspace buffersize right away, rather than preparing the output of each current entry of the hostcase, provided by: @tuexen.
This makes use of the ready-made functions of sbuf to work with sysctl, and repeatedly drain the much smaller buffer.
PR: 254333 MFC after: 2 weeks Reviewed By: #transport, tuexen Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D29471
show more ...
|
Revision tags: release/12.2.0, release/11.4.0 |
|
#
75dfc66c |
| 27-Feb-2020 |
Dimitry Andric <dim@FreeBSD.org> |
Merge ^/head r358269 through r358399.
|