Re: [PATCH v7 0/5] ceph: reduce mdsc->mutex contention in the cephfs kclient
From: Alex Markuze
Date: Sun Nov 22 2026 - 13:30:47 EST
Hi Xiubo,
Thanks for updating the replay path and snapshotting the send counters.
I think two progress races remain:
1. Replay can miss a wake if dispatch ownership is taken again. Replay
selects an in-flight request for session A as busy and drops
mdsc->mutex. An already-dispatched forward sets RESEND, and replay
sets REPLAY_WAIT. The original sender can then clear DISPATCHING,
consume REPLAY_WAIT and wake the waiter, before restarting on an open
session B and reclaiming DISPATCHING. If replay enters wait_on_bit()
after that reclaim, the second release will not wake it because
REPLAY_WAIT is already clear. Replay stays blocked while holding A's
s_mutex.
2. A fast forward of an async create can make the submitting thread wait
for itself. If the forward arrives during the first send, the sender
consumes RESEND and restarts in ceph_mdsc_submit_request(). With an
already open or hung destination session, it sees the nonzero forward
count and waits on CEPH_DENTRY_ASYNC_CREATE_BIT. That bit is cleared
by ceph_finish_async_create(), which the same thread cannot reach
until ceph_mdsc_submit_request() returns.
Could the replay waiter remain wakeable across a new dispatch claim, and
could the async-create retry avoid waiting in the submitting thread before
it has finished the local create?
Thanks,
Alex