Re: [PATCH v4 0/5] ceph: reduce mdsc->mutex contention in the cephfs kclient

Xiubo Li <[email protected]>
Newsgroups org.kernel.vger.ceph-devel
Message-ID <CAOJNxRJm8gcaDHQghE1jB5+jV4gcF6FyaVfzsSp9jTWdj0JrTA@mail.gmail.com>
Hi Alex,

Thanks for the feedback and for spotting those issues in patch 4 and
5. You are right, I will fix them and respin as v5.

Thanks
- Xiubo

On Mon, 17 Aug 2026 at 04:05, Alex Markuze <[email protected]> wrote:
>
> Hi Xiubo,
>
> Patches 1-4 look good — the xarray replacement and the wait_list_lock
> are clean, and the mutex narrowing is the right direction. One blocker
> in patch 5:
>
> replay_unsafe_requests() calls list_del_init(&req->r_unsafe_item) before
> parking the request on the local walk list via r_aux_item. That permanently
> removes the request from session->s_unsafe. After replay, the request is
> no longer tracked as unsafe — subsequent reconnects won't replay it, and
> cleanup_session_requests() can't drop it with -EIO on session teardown.
> The request can get stuck in the xarray with no error surfaced to userspace.
>
> The fix is to not unlink from s_unsafe at all — just add to the local list
> via r_aux_item and leave r_unsafe_item in place. That's the whole point of
> having r_aux_item.
>
> Also r_aux_item is added to the struct in patch 4 but never initialized
> with INIT_LIST_HEAD() in ceph_mdsc_create_request().
>
> Could you respin as v5?
>
> --
> Alex Markuze
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.