mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yingjie Wang <x-professor@outlook.com>
To: Yang Xiuwei <yangxiuwei@kylinos.cn>,
	Bart Van Assche <bvanassche@acm.org>
Cc: "mkp@kernel.org" <mkp@kernel.org>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	"jthoughton@google.com" <jthoughton@google.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"io-uring@vger.kernel.org" <io-uring@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 6/6] scsi: bsg: release io_uring requests in end-I/O
Date: Thu, 29 Oct 2026 16:39:28 +0000	[thread overview]
Message-ID: <20261029.scsi-lifetime-v3-plan.7ad5c4111d3b@outlook.com> (raw)
In-Reply-To: <20261027093528.477408-1-yangxiuwei@kylinos.cn>

Hi Yang, Bart,

On Tue, Oct 27, 2026, Yang Xiuwei wrote:
> For reference: scsi_mq_init_request() already allocates sense_buffer
> from scsi_sense_cache. A second buffer from that cache, bsg_sense, can
> hold the copy.

Thanks for the suggestion. I tried allocating a second buffer from
scsi_sense_cache in end-I/O for CHECK CONDITION responses. With 16
commands in flight, all returning CHECK CONDITION, the variant added
4.5 to 5.2 us per command on a KASAN kernel compared with keeping the
request until task work. Without debug options, the difference was
within run-to-run noise.

For v3, I will leave out the additional allocation. End-I/O will free
requests that do not need a sense copy, as NVMe passthrough does. For
sense-bearing requests, task work will save the sense data on the stack
and free the request before user copyback. The tag will still be held
until that point.

Rejecting IORING_SETUP_DEFER_TASKRUN would not address faults during
ordinary task work either. The sense-length fix from v2 5/6 is folded
into v3 5/6.

I will also account for James Houghton's cancellation fix when rebasing,
since it touches the same callback.

I plan to send v3 after -rc1, once the prerequisites are in place.

Thanks,
Yingjie

  reply	other threads:[~2026-10-29 16:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-26  8:29 [PATCH v2 0/6] scsi: release completed passthrough requests before user copyback Yingjie Wang
2026-10-26  8:29 ` [PATCH v2 1/6] scsi: core: release SG_IO request " Yingjie Wang
2026-10-26  8:29 ` [PATCH v2 2/6] scsi: core: release legacy ioctl " Yingjie Wang
2026-10-26  8:29 ` [PATCH v2 3/6] scsi: sr: release CDDA " Yingjie Wang
2026-10-26  8:29 ` [PATCH v2 4/6] scsi: bsg: release synchronous " Yingjie Wang
2026-10-26  8:29 ` [PATCH v2 5/6] scsi: bsg: clear io_uring sense length on copy failure Yingjie Wang
2026-10-26  9:40   ` Yang Xiuwei
2026-10-26  8:29 ` [PATCH v2 6/6] scsi: bsg: release io_uring requests in end-I/O Yingjie Wang
2026-10-26  9:40   ` Yang Xiuwei
2026-10-27  9:35     ` Yang Xiuwei
2026-10-29 16:39       ` Yingjie Wang [this message]
2026-10-26 15:56   ` Bart Van Assche

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=20261029.scsi-lifetime-v3-plan.7ad5c4111d3b@outlook.com \
    --to=x-professor@outlook.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=io-uring@vger.kernel.org \
    --cc=jthoughton@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mkp@kernel.org \
    --cc=yangxiuwei@kylinos.cn \
    /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

all inboxes | Powered by JetHome®