Re: [PATCH v8 0/5] ceph: reduce mdsc->mutex contention in the cephfs kclient
From: Xiubo Li
Date: Tue Dec 01 2026 - 20:41:25 EST
Hi Alex,
Thanks, all three are real; I reproduced each one with fault injection
on a KASAN + lockdep kernel. I will fix it with V9.
BRs
Xiubo
On Mon, 30 Nov 2026 at 18:28, Alex Markuze <amarkuze@xxxxxxxxxx> wrote:
>
> Hi Xiubo,
>
> Thanks for fixing the replay wakeup and the async-create submitter
> self-wait from v7. There are still three issues to address:
>
> Patch 4 drops mdsc->mutex before create_request_message() reads
> mdsc->mdsmap->m_epoch. A map update can free that map during the read.
> The ceph_monc_got_map() call also reads the epoch after unlocking.
> Please capture the epoch under the mutex for both paths.
>
> In patch 5, a delayed forward handler can redispatch after the original
> sender has handled RESEND, even after a safe reply has unregistered the
> request but before GOT_RESULT is set. A delayed kick can also send a
> request that has since been put back on a session wait list, leaving its
> wait node linked. Please give each resend one dispatch owner, reject
> stale work at handoff, and unlink the wait node before sending.
>
> Once request encoding runs outside the mutex, it can pick up the zero
> that __unregister_request() stores in oldest_tid before publishing the
> next TID. An MDS that interprets zero as trim-all can then discard
> completion records the client still needs for retries. Please compute
> the replacement before publishing oldest_tid, so removal doesn't
> expose zero when another tracked request remains.
>
> Thanks,
> Alex