From nobody Tue Aug 20 15:16:31 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WpCjb1wjbz5TJFf; Tue, 20 Aug 2024 15:16:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WpCjZ5yL1z4vvy; Tue, 20 Aug 2024 15:16:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id gNNssCutZ9TOUgQb3s0uqD; Tue, 20 Aug 2024 15:16:33 +0000 Received: from spqr.komquats.com ([70.66.152.170]) by cmsmtp with ESMTPSA id gQb1sia7vE0IVgQb3sMtwX; Tue, 20 Aug 2024 15:16:33 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=cI9DsUeN c=1 sm=1 tr=0 ts=66c4b351 a=y8EK/9tc/U6QY+pUhnbtgQ==:117 a=y8EK/9tc/U6QY+pUhnbtgQ==:17 a=kj9zAlcOel0A:10 a=yoJbH4e0A30A:10 a=6I5d2MoRAAAA:8 a=YxBL1-UpAAAA:8 a=EkcXrb_YAAAA:8 a=w3Aupa3vw4SgNZJgN8gA:9 a=CjuIK1q_8ugA:10 a=IjZwj45LgO3ly-622nXo:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=LK5xJRSDVpKd5WXXoEvA:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id B034FD27; Tue, 20 Aug 2024 08:16:31 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 964971E8; Tue, 20 Aug 2024 08:16:31 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Mark Johnston cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: fb901935f257 - main - socket: Split up sosend_generic() In-reply-to: References: <202408191437.47JEbhOG094258@gitrepo.freebsd.org> <20240820143730.9BCDB1E3@slippy.cwsent.com> Comments: In-reply-to Mark Johnston message dated "Tue, 20 Aug 2024 10:50:31 -0400." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 20 Aug 2024 08:16:31 -0700 Message-Id: <20240820151631.964971E8@slippy.cwsent.com> X-CMAE-Envelope: MS4xfJbZeLl2D+OVmxAxFbm66sJvGRGisE3gMVhcZEZbA34/uBgCkJcW2ghB/CImKCcyZ2eCiDyVOQIe5RhZYi2lcvAyQ0UndAym4fylgjO1BT/CyZaCGbN7 GTAa8Ih4Geqp7e8uSHyDiG/CMwBceDJQ3aOhhQfQtvuf+4hcINJdUBS1UhZZoySJ7ZqHahQfcs/8bJ4tg0xIoniF6QC7ziwoqOKuWekopz4pmtRnr1yT9pNk pZ+yJAVhc39UsC1VNTv/gaqPJZVhHVRmx9PvMEJP855XOm7MkvKjRePN0yEY0QaqdoGkDZBscGIKvmuTLzmqWzL5C8ehJ8NBdDxoD8wODiY= X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US] X-Rspamd-Queue-Id: 4WpCjZ5yL1z4vvy In message , Mark Johnston writes: > On Tue, Aug 20, 2024 at 07:37:30AM -0700, Cy Schubert wrote: > > In message <202408191437.47JEbhOG094258@gitrepo.freebsd.org>, Mark Johnston > > > wri > > tes: > > > The branch main has been updated by markj: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=fb901935f257ddcc492fe9efb605 > 797f > > > 181c6597 > > > > > > commit fb901935f257ddcc492fe9efb605797f181c6597 > > > Author: Mark Johnston > > > AuthorDate: 2024-08-19 14:20:43 +0000 > > > Commit: Mark Johnston > > > CommitDate: 2024-08-19 14:37:27 +0000 > > > > > > socket: Split up sosend_generic() > > > > > > Factor out the bits that run with the sock I/O lock held into a separ > ate > > > function. In this implementation, we are doing a bit more work under > > > the I/O lock than before. However, lock contention is only a problem > > > when multiple threads are transmitting on the same socket, which is a > n > > > unusual case that is not expected to perform well in any case. > > > > > > No functional change intended. > > > > > > Reviewed by: gallatin, glebius > > > MFC after: 2 weeks > > > Sponsored by: Klara, Inc. > > > Sponsored by: Stormshield > > > Differential Revision: https://reviews.freebsd.org/D46305 > > > --- > > > sys/kern/uipc_socket.c | 47 +++++++++++++++++++++++++++++--------------- > --- > > > 1 file changed, 29 insertions(+), 18 deletions(-) > > > > > > [...] > > > > This commit broke NFS over TCP (V3 and V4). It it results in random > > unrecoverable hangs of an NFS share. > > > > My test is to installworld/installkernel over NFS from my main build server > . > > > > All the other socket commits in this series had no adverse affect on NFS > > over TCP. > > Does the patch below fix this for you? > > diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c > index 13b6253bd115..42c43539b484 100644 > --- a/sys/kern/uipc_socket.c > +++ b/sys/kern/uipc_socket.c > @@ -1920,7 +1920,7 @@ sosend_generic(struct socket *so, struct sockaddr *addr > , struct uio *uio, > { > int error; > > - error = SOCK_IO_SEND_LOCK(so, 0); > + error = SOCK_IO_SEND_LOCK(so, SBLOCKWAIT(flags)); > if (error) > return (error); > error = sosend_generic_locked(so, addr, uio, top, control, flags, td); Thanks. This fixes it. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e^(i*pi)+1=0