Date: Fri, 16 Apr 2021 22:12:36 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 254333] [tcp] sysctl net.inet.tcp.hostcache.list hangs Message-ID: <bug-254333-7501-A3qoKltIIh@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-254333-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-254333-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D254333 --- Comment #39 from commit-hook@FreeBSD.org --- A commit in branch stable/11 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc449b8a71bce7d7838164f6a5595f71c9= 1b5b91b commit c449b8a71bce7d7838164f6a5595f71c91b5b91b Author: Richard Scheffenegger <rscheff@FreeBSD.org> AuthorDate: 2021-03-28 21:12:03 +0000 Commit: Richard Scheffenegger <rscheff@FreeBSD.org> CommitDate: 2021-04-16 21:33:09 +0000 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 (cherry picked from commit cb0dd7e122b8936ad61a141e65ef8ef874bfebe5) sys/netinet/tcp_hostcache.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-254333-7501-A3qoKltIIh>