aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/tcp_syncache.c
diff options
context:
space:
mode:
authorGeorge V. Neville-Neil <gnn@FreeBSD.org>2014-01-28 20:28:32 +0000
committerGeorge V. Neville-Neil <gnn@FreeBSD.org>2014-01-28 20:28:32 +0000
commit6f3caa6d8159eeef8831510bee51ad81e798583d (patch)
tree4d0b96b75a192fb2c57a32f334187e4e6c60d0b7 /sys/netinet/tcp_syncache.c
parent3a6cdc4e5518a9b22c4738ee8f9cf18ad2cf41f4 (diff)
downloadsrc-6f3caa6d8159eeef8831510bee51ad81e798583d.tar.gz
src-6f3caa6d8159eeef8831510bee51ad81e798583d.zip
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 disucssion of this change and its measured effects. PR: 183659 Submitted by: Julian Charbon Reviewed by: jhb
Notes
Notes: svn path=/head/; revision=261242
Diffstat (limited to 'sys/netinet/tcp_syncache.c')
-rw-r--r--sys/netinet/tcp_syncache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c
index af30ad14e847..e060beb9978d 100644
--- a/sys/netinet/tcp_syncache.c
+++ b/sys/netinet/tcp_syncache.c
@@ -682,7 +682,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);