From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-block@vger.kernel.org, Josef Bacik <josef@toxicpanda.com>,
Eric Dumazet <edumazet@kernel.org>,
Aibing Chen <chenaibing@cmss.chinamobile.com>
Subject: Re: [PATCH 0/8] nbd: Defer request transmission to a workqueue
Date: Mon, 16 Nov 2026 19:47:00 -0700 [thread overview]
Message-ID: <3868f992-20ee-4b04-9416-40a5a333cc27@kernel.dk> (raw)
In-Reply-To: <cover.1794865298.git.bvanassche@acm.org>
On 11/16/26 2:48 PM, Bart Van Assche wrote:
> Hi Jens,
>
> The NBD driver transmits requests over sockets owned by user space directly
> from nbd_queue_rq(). Hence, sk_lock is acquired while blk-mq holds
> q->q_usage_counter and set->srcu. Since other kernel code acquires sk_lock
> before fs_reclaim, mm->mmap_lock and other subsystem locks, syzbot reports
> multiple circular locking dependencies. Socket lockdep reclassification, the
> existing workaround, introduces new races and module reference count leaks,
> and does not suppress all of these reports.
>
> This patch series fixes these lockdep complaints by deferring request
> transmission to a workqueue, similar to the loop driver, and by removing
> the socket lockdep reclassification code. Since requests are no longer
> transmitted from a context in which signals can be pending, the
> partial-send handling code is removed.
>
> This patch series is organized as follows:
> - Patch 1 fixes a missing wakeup of wait_for_reconnect() callers when
> NBD_RT_DISCONNECTED is set.
> - Patches 2 and 3 prepare for deferring request transmission by
> simplifying the nbd_send_cmd() return values and by no longer taking a
> config_refs reference for each request.
> - Patch 4 defers request transmission to a workqueue.
> - Patch 5 fixes a nsock->tx_lock -> cpu_hotplug_lock lockdep complaint.
> - Patch 6 removes the socket lockdep reclassification code.
> - Patches 7 and 8 remove the partial-send handling code that has become
> unreachable.
>
> Please consider this patch series for the next merge window.
Something like this _really_ needs performance numbers.
--
Jens Axboe
prev parent reply other threads:[~2026-11-17 2:47 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 21:48 [PATCH 0/8] nbd: Defer request transmission to a workqueue Bart Van Assche
2026-11-16 21:48 ` [PATCH 1/8] nbd: Wake up config->conn_wait when setting NBD_RT_DISCONNECTED Bart Van Assche
2026-11-16 21:48 ` [PATCH 2/8] nbd: Requeue requests directly in nbd_send_cmd() Bart Van Assche
2026-11-16 21:48 ` [PATCH 3/8] nbd: Stop taking a config_refs reference per request Bart Van Assche
2026-11-16 21:48 ` [PATCH 4/8] nbd: Defer request transmission to a workqueue Bart Van Assche
2026-11-16 21:48 ` [PATCH 5/8] nbd: Call sk_set_memalloc() outside nsock->tx_lock Bart Van Assche
2026-11-16 21:48 ` [PATCH 6/8] nbd: Remove socket lockdep reclassification Bart Van Assche
2026-11-16 21:48 ` [PATCH 7/8] nbd: Remove the partial-send handling Bart Van Assche
2026-11-16 21:48 ` [PATCH 8/8] nbd: Remove the sent argument of sock_xmit() Bart Van Assche
2026-11-17 2:47 ` Jens Axboe [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3868f992-20ee-4b04-9416-40a5a333cc27@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=chenaibing@cmss.chinamobile.com \
--cc=edumazet@kernel.org \
--cc=josef@toxicpanda.com \
--cc=linux-block@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox