From nobody Tue Aug 20 14:50:31 2024 X-Original-To: dev-commits-src-main@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 4WpC7c3d90z5TGFx; Tue, 20 Aug 2024 14:50:36 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WpC7b6Txjz4r9H; Tue, 20 Aug 2024 14:50:35 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qv1-xf31.google.com with SMTP id 6a1803df08f44-6bf6606363fso32303556d6.3; Tue, 20 Aug 2024 07:50:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724165435; x=1724770235; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=OGhL1ER0vAmkZfLN0+Tod5Lzx5gFBujhxrq24/HFIQg=; b=OJNTVylpcoNFDwYaIKtJNHBu0crvG0hjIU/Nlomsj7sCr50F09EzOzcJiIALQWwtHV jNIcaYFL0UjigHom6MHbD6cEcBukd7czEX1lZPFtxKkAc636XE2Ws5kQSaPynKuO6+o3 79PtJ7Qy3VLchCGVPXD6MXfGZpyj6gOdyIlyz7XlHWFaGaiIJyXE1LRu7y7nlQFBH4dT M8I5zDKOHuOoo3x9lJSdZwCNy0MfLxeZ2U3FPrkCIPDfSNh79oHPZI/fueohwvP1MoMU ZSGZwg/GgWF7RzNNMP3xFw/AKCeQ5U5/wRD4WWxalI2sR6ae0GwVZsQUqTy0vWvgDWL4 pmKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724165435; x=1724770235; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OGhL1ER0vAmkZfLN0+Tod5Lzx5gFBujhxrq24/HFIQg=; b=lZ5R8XUcqxWRHDng/hkJHWmwhTRg09gsk5mTWXnsnxrIZfjDOX4C2Rag23/TOO2Ttp nk5F5EMtl0YtCSNTEkJtcVz/3h1kCELuouhEGOUwVJqbCqK2/jjbNcZc559+h1/0GuZX 5VDzWNubv7NMXotUPfZbeFZ5isCi2pFmz+JujdLYCY7kL4DeUjCEenISCtHxpOarpMwT XFFkbCl2Nx9GKMT8FvQBjMVxkZoJZi8zGTTDfo2zialTqBYFphOdq7AfhsjgShYqiEmB 5uAVneIAp9E6qpUViSFY/OJ+cIUiEvd9oCs+9VZb6HcUDy7kHjBuVjF50ebn+LFhmc3x jkpw== X-Forwarded-Encrypted: i=1; AJvYcCUcVC0mP7uBZCFQc0+Gqk1baLkSEPRQ3pHWKtjbrZUmfPt3jj0UMMSx4XTwgq5hUpDmiOI2QFDCrz1hn+/nJl/zeYbM9D0=@freebsd.org, AJvYcCX61hFjqk32dC2lqQ2YEjGlurQ374KZlsh9EBqluqwvyEyvvZ7ZDX/e1oSuU1cPg+7P6uJtBBo6IqNl0UKoof+cgsHB@freebsd.org X-Gm-Message-State: AOJu0YwdQ+eXSKsbZJ2U6zlFRxw+mxvX1wzJla81EBVYwHd8fH10U9T2 gQp0eGdb+ALZu55tAVgM8oUKJF/Tb/p5QWOxH9MfFPGgTXtOhZf6BM9oFQ== X-Google-Smtp-Source: AGHT+IF8bRd203Uuc1Cm728DiOyJiHG/NmN2WLy+cr8kX0WUM7XHT+Hepvt4816dQDjSn/DCdRMVQw== X-Received: by 2002:a05:6214:3c9c:b0:6b7:a6eb:c343 with SMTP id 6a1803df08f44-6bf7ce9648fmr154650586d6.51.1724165434779; Tue, 20 Aug 2024 07:50:34 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bf6fdd7fb4sm52390006d6.28.2024.08.20.07.50.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2024 07:50:34 -0700 (PDT) Date: Tue, 20 Aug 2024 10:50:31 -0400 From: Mark Johnston To: Cy Schubert Cc: 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() Message-ID: References: <202408191437.47JEbhOG094258@gitrepo.freebsd.org> <20240820143730.9BCDB1E3@slippy.cwsent.com> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240820143730.9BCDB1E3@slippy.cwsent.com> 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:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4WpC7b6Txjz4r9H 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=fb901935f257ddcc492fe9efb605797f > > 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 separate > > 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 an > > 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);