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=1795920642; b=EPaTn/xy7RrUBEFnZPkwTQPbmPbuuspM5p15cgpbefn+HKm0DCwHTn/bnURlCarzWfD6 zY5CcO2rvUr5AEFVZFeDktKSrQ/4FFQsv2MNX2pBxN1mcuWHjDVZAVpcw/2+tDAOfRkRG b40SaWLi3l6DJmnYDn6euWLaluVWUHpZiiuUtMB70FHlU/J5Trb98fNAWBKCnzZYySTmq OCbOpkc9V7I1vOxjtCQ5pkUtorfYMPuWiwtCYgMZgwEKhxLj2bCaFCIAAy122yJWdgCLD riQMR73ny0HM1uJSsmVL3DV5fe1vHQukcu05WvoRMErq5bwHPM3xhI1nffgo3AGpjnw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795920642; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=4fKQCpqpsONoz4iKcUdWUBHmUpRoZ83FStIfKq/oALo=; b=06t0s2nV4364olliDpIKrYNy8MZsw56KxULwemb126w9IT5vHR6siOeStIJwzCgCpQCd Qm8mVdIzGKkCFNRfzxgCetjGrGhiyCK5ib5uSRbRUijdeTSvz5eSWxpRo/4a30/EnWbnP TMGkKzNOxF9F4GKmYdBTH5fLPv4qFYOINUryqECZbpH7T+BLXLnwKl4FUxlB4FXcWuFIV t2GOPsuiDAMigzmrutSo1vtA00OnLEonwlgMgOpHifZoSd/4lS0eDmhouo744w2qstvOC hlHKR2Phcxq4n+zcNHNdI/Wls2HGtjZiWY5uKgu0/YqNik31VIAfIF576epmUDJ5oEA== 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="LHDFU5/H"; 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 56130606A31C for ; Sun, 29 Nov 2026 02:50:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=LHDFU5/H Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED9571F00897; Sun, 29 Nov 2026 02:50:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795920642; bh=4fKQCpqpsONoz4iKcUdWUBHmUpRoZ83FStIfKq/oALo=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=LHDFU5/HSZjMo+LTsDltE3mD7BgtSwvUnjOHpr86/0O8ma6KKzu2eeCUwTM7bNOXa ZVw1Kh7ZWlUXF/dN/tlUGglGE+KkKOwXwsPfHoiMHsjO568iSTDblKQHqxxwpu0Yqc cRaFnJODopCwNfIv7ANSl1zGdJjdCejPR/9yYYTwfYyAB8omJEsfM2Qdwk6speft0f 0kixi6dzeBC46vVC4JUGOl4goGuh+JYaT7af8DCT4DAVSylMv5ZFTWlHxVap+RomWh lIyDsXbP5tYFMZWbfY6Ni+CWe1p37nm41odkfnOBLwkOqyyIMVQYkWKPs2aP+tLMyF uBcOruvzmkJ8g== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net] net/rds: use wq_has_sleeper() in rds_ib_ring_free() Reply-To: sashiko-reviews@lists.linux.dev To: "Zhenwen Liang" Cc: linux-rdma@vger.kernel.org In-Reply-To: <20261129024701.277838-1-zhenwenliang@google.com> References: <20261129024701.277838-1-zhenwenliang@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sun, 29 Nov 2026 02:50:41 +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_ring_free() returns slots to a work ring with atomic_add() and > then checks waitqueue_active() on rds_ib_ring_empty_wait to decide > whether anyone needs waking. atomic_add() carries no ordering and > waitqueue_active() is a plain load, so nothing orders the counter update > before the wait queue read. The waiter does the mirror image: > rds_ib_conn_path_shutdown() adds itself to rds_ib_ring_empty_wait in > wait_event_timeout(), which sets the task state with a full barrier, and > then checks, among other conditions, whether the receive ring is empty. > That is the store-buffering pattern described above waitqueue_active() > in include/linux/wait.h: the waker can observe an empty wait queue while > the waiter still observes the ring as not empty, and no wakeup is > issued, so connection shutdown in rds_ib_conn_path_shutdown() stalls: on > kernels with commit 16f48efaeb69 ("net/rds: Don't sleep inside > rds_ib_conn_path_shutdown") or its stable backports, the waiter wakes > after at most about 1 s; on kernels without it, it waits until the next > [ ... ] > the barrier is emitted between the atomic_add() and the wait queue load > in arm64 object code; not runtime-tested. >=20 > Fixes: f528efe276ec ("RDS/IB: Ring-handling code.") > Signed-off-by: Zhenwen Liang Sashiko has reviewed this patch and found no issues. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261129024701.2778= 38-1-zhenwenliang@google.com?part=3D1