Date: Sat, 26 Jun 2004 19:10:39 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/sys/kern uipc_socket2.c uipc_usrreq.c src/sys/netinet ip_divert.c ip_mroute.c raw_ip.c tcp_input.c udp_usrreq.c Message-ID: <200406261910.i5QJAd8d072787@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
rwatson 2004-06-26 19:10:39 UTC FreeBSD src repository Modified files: sys/kern uipc_socket2.c uipc_usrreq.c sys/netinet ip_divert.c ip_mroute.c raw_ip.c tcp_input.c udp_usrreq.c Log: Reduce the number of unnecessary unlock-relocks on socket buffer mutexes associated with performing a wakeup on the socket buffer: - When performing an sbappend*() followed by a so[rw]wakeup(), explicitly acquire the socket buffer lock and use the _locked() variants of both calls. Note that the _locked() sowakeup() versions unlock the mutex on return. This is done in uipc_send(), divert_packet(), mroute socket_send(), raw_append(), tcp_reass(), tcp_input(), and udp_append(). - When the socket buffer lock is dropped before a sowakeup(), remove the explicit unlock and use the _locked() sowakeup() variant. This is done in soisdisconnecting(), soisdisconnected() when setting the can't send/ receive flags and dropping data, and in uipc_rcvd() which adjusting back-pressure on the sockets. For UNIX domain sockets running mpsafe with a contention-intensive SMP mysql benchmark, this results in a 1.6% query rate improvement due to reduce mutex costs. Revision Changes Path 1.136 +5 -8 src/sys/kern/uipc_socket2.c 1.131 +3 -6 src/sys/kern/uipc_usrreq.c 1.93 +6 -4 src/sys/netinet/ip_divert.c 1.102 +5 -2 src/sys/netinet/ip_mroute.c 1.135 +7 -3 src/sys/netinet/raw_ip.c 1.248 +13 -8 src/sys/netinet/tcp_input.c 1.156 +7 -2 src/sys/netinet/udp_usrreq.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406261910.i5QJAd8d072787>