From 3f1f4f0e73b6d12c01e8cad4791d23e8e56127db Mon Sep 17 00:00:00 2001 From: jch Date: Mon, 18 Jul 2016 08:20:31 +0000 Subject: MFC r261242: Decrease lock contention within the TCP accept case by removing the INP_INFO lock from tcp_usr_accept. As the PR/patch states this was following the advice already in the code. See the PR below for a full discussion of this change and its measured effects. PR: 183659 Submitted by: Julien Charbon Reviewed by: jhb --- sys/netinet/tcp_syncache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/netinet/tcp_syncache.c') diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 0398b03..03e8c72 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -683,7 +683,7 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) * connection when the SYN arrived. If we can't create * the connection, abort it. */ - so = sonewconn(lso, SS_ISCONNECTED); + so = sonewconn(lso, 0); if (so == NULL) { /* * Drop the connection; we will either send a RST or @@ -922,6 +922,8 @@ syncache_socket(struct syncache *sc, struct socket *lso, struct mbuf *m) INP_WUNLOCK(inp); + soisconnected(so); + TCPSTAT_INC(tcps_accepts); return (so); -- cgit v1.1