From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796232481; b=bPR1mPR7vWchXzgPz5QbWFl98RvqCLLsgu9C/YeJd4vfKx+fbkmCNESchUlI3t0UiBWq G/HGKi0SMt9AppxOKLNPriwwvDKQCK1uggPND6qpjhVo3i13YWQoYXk4+rVPYR/cDCf+/ iKJ/E5aq/pQQyIqCNMunAVL+H1RPtDOULcgUO8CKCX/LTUIRE+SI6T2eCvXj5wNfmL7Al 53nnCFuB/YFOqj6DLmfT2WjOS8r4f9OzZdYwLjXQISrUpNAJrBwfczSTdggSnkGLyBvNe uOtCDQW2bsDa52g5VcpBY7bVjIogBR2FVJp6JMY2Hxf2oOA7wGojdzSl4rA44zOK9zQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796232481; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=T1g7LQ1MbbBSfWPiqLjzolIFODs1JN30bTuf4nc4Ggk=; b=McW+vu7zbrwN/OffX4idAMFwpIP12tQP9Rkg50r02GTaOz91BztqLhJwf5f8XIvlwTGj g6GGlniYMtL/CtyPA1WRvOZ/n1cMmoSWOusClR4VoTpt3X7Q/F6fezHzDP3rvk+/HTh5w jbgS+9HPQcjovkxh/IXEqE1Di6MhcgDTjmDYXVoUPK4Bk7ytjdXJzb6duKLoaBWO6pWL/ ySHV1pngxRv79E+F07XFd1cVt7LNapViPncJ/qzcH0Cum5kzoBtJJyBy7zilbmORHbhyW 7/8w2/fyk4DK5Nr98gbWwftoHch/V46qZGIr1dpQub10S+UVe80y6g+jDqm0tI0xEBA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="bjL/En6/"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D52EF606A31A for ; Wed, 2 Dec 2026 17:28:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=bjL/En6/ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A34C1F00893; Wed, 2 Dec 2026 17:28:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796232481; bh=T1g7LQ1MbbBSfWPiqLjzolIFODs1JN30bTuf4nc4Ggk=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=bjL/En6/HwNnuEKpcWcYXDfTETDqeXq62UWWx2YIHFSvb10HTO0gdEnkv+jO3rtBy ZdfbUCoR9qoL+uAsXRlqGnItJEAaGdsRDJgL84Jv5/GrnECYR5bxSGJaitNH1gHjuE aPHfEnhb+inJxpc64OUe2C1B5SiQI615Kd+bPLm5aILS528BJN9YGrVIaCq+jfrnLj FHXrMJ+NG2ir9u98n35mw/j0x/T/plw/oTz+226RVrQdN1amlXwm4Gs8bT9AbZEYgN n7fREpenyNEoDpideCyOQQNVKECPSj4A0TunsqD2ekiMYEiMrN5IiYdyJNkCgJdwNL fwGsMIQufZBmA== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net v2] net/rds: wake the shutdown waiter after returning the FRWR slot Reply-To: sashiko-reviews@lists.linux.dev To: "Zhenwen Liang" Cc: linux-rdma@vger.kernel.org In-Reply-To: <20261202172415.2785749-1-zhenwenliang@google.com> References: <20261202172415.2785749-1-zhenwenliang@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 17:27:58 +0000 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list > rds_ib_conn_path_shutdown() waits until, among other things, > i_fastreg_inuse_count is 0 and i_fastreg_wrs is back at > RDS_IB_DEFAULT_FR_WR. rds_transition_frwr_state() wakes it when it drops > i_fastreg_inuse_count, but every caller still holds an i_fastreg_wrs slot > at that point and returns it later without a wake-up. A waiter that > rechecks in between goes back to sleep, and shutdown waits for its 1 s > timeout on any architecture. >=20 > Wake the waiter after the slot is returned instead, using > wq_has_sleeper() so that the increment is ordered before the wait queue > check. >=20 > Allison Henderson pointed out that the sashiko review of a similar fix > flagged this site. The analysis was checked, and this patch prepared, > with the help of a formal analysis tool we are developing that uses AI > assistance; I have reviewed the analysis and the patch. >=20 > Fixes: 3a2886cca703 ("net/rds: Keep track of and wait for FRWR segments i= n use upon shutdown") > Suggested-by: Allison Henderson > Signed-off-by: Zhenwen Liang Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202172415.2785= 749-1-zhenwenliang@google.com?part=3D1