From: Bart Van Assche <bvanassche@acm.org>
To: John Garry <john.g.garry@oracle.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, John Garry <john.garry@huawei.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v3 04/26] scsi: core: Bypass the queue limit checks for reserved commands
Date: Thu, 4 Sep 2025 12:25:16 -0700 [thread overview]
Message-ID: <883d6a67-40f8-4a13-a433-d452d0c75571@acm.org> (raw)
In-Reply-To: <e555a601-2b87-4139-ace7-0e6158cc93af@oracle.com>
On 9/4/25 2:49 AM, John Garry wrote:
> On 27/08/2025 01:06, Bart Van Assche wrote:
>> [ bvanassche: modified patch title and patch description.
>
> it's an odd name now... I don't know which queue limits we are bypassing
I can change "queue" into "SCSI host" in the patch title.
>> --- a/drivers/scsi/scsi_lib.c
>> +++ b/drivers/scsi/scsi_lib.c
>> @@ -1539,6 +1539,14 @@ static void scsi_complete(struct request *rq)
>> struct scsi_cmnd *cmd = blk_mq_rq_to_pdu(rq);
>> enum scsi_disposition disposition;
>> + if (blk_mq_is_reserved_rq(rq)) {
>> + /* Only pass-through requests are supported in this code
>> path. */
>> + WARN_ON_ONCE(!blk_rq_is_passthrough(scsi_cmd_to_rq(cmd)));
>
> eh, do we really have passthough reserved command?
All reserved commands that end up in scsi_complete() should be
pass-through commands (REQ_OP_DRV_IN / REQ_OP_DRV_OUT), isn't it?
I don't think that we should allow other request types for reserved
commands.
>> - if (unlikely(sdev->sdev_state != SDEV_RUNNING)) {
>> - ret = scsi_device_state_check(sdev, req);
>> - if (ret != BLK_STS_OK)
>> - goto out_put_budget;
>> - }
>> + if (!blk_mq_is_reserved_rq(req)) {
>> + /*
>> + * If the device is not in running state we will reject some or
>> + * all commands.
>> + */
>> + if (unlikely(sdev->sdev_state != SDEV_RUNNING)) {
>
> I am curious about this. I mentioned previously if we only send reserved
> commands to the psuedo sdev (in this seris). If so, would the psuedo
> sdev not always be running state?
Has the above code change perhaps been misread? The above change causes
the sdev->sdev_state check to be skipped for pseudo SCSI devices.
Thanks,
Bart.
next prev parent reply other threads:[~2025-09-04 19:25 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 0:06 [PATCH v3 00/26] Optimize the hot path in the UFS driver Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 01/26] scsi: core: Support allocating reserved commands Bart Van Assche
2025-09-04 8:49 ` John Garry
2025-09-04 17:00 ` Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 02/26] scsi: core: Support allocating a pseudo SCSI device Bart Van Assche
2025-09-04 8:59 ` John Garry
2025-09-04 9:29 ` John Garry
2025-09-04 18:05 ` Bart Van Assche
2025-09-05 15:02 ` John Garry
2025-08-27 0:06 ` [PATCH v3 03/26] scsi: core: Do not allocate a budget token for reserved commands Bart Van Assche
2025-09-04 9:41 ` John Garry
2025-09-04 18:17 ` Bart Van Assche
2025-09-05 15:17 ` John Garry
2025-09-05 16:36 ` Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 04/26] scsi: core: Bypass the queue limit checks " Bart Van Assche
2025-09-04 9:49 ` John Garry
2025-09-04 19:25 ` Bart Van Assche [this message]
2025-09-05 15:07 ` John Garry
2025-08-27 0:06 ` [PATCH v3 05/26] scsi: core: Add scsi_{get,put}_internal_cmd() helpers Bart Van Assche
2025-09-04 9:56 ` John Garry
2025-09-04 19:41 ` Bart Van Assche
2025-09-05 15:05 ` John Garry
2025-09-05 16:37 ` Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 06/26] scsi_debug: Set .alloc_pseudo_sdev Bart Van Assche
2025-09-04 10:02 ` John Garry
2025-09-04 19:44 ` Bart Van Assche
2025-09-05 15:00 ` John Garry
2025-08-27 0:06 ` [PATCH v3 07/26] ufs: core: Move an assignment Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 08/26] ufs: core: Change the type of one ufshcd_add_cmd_upiu_trace() argument Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 09/26] ufs: core: Only call ufshcd_add_command_trace() for SCSI commands Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 10/26] ufs: core: Change the type of one ufshcd_add_command_trace() argument Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 11/26] ufs: core: Change the type of one ufshcd_send_command() argument Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 12/26] ufs: core: Only call ufshcd_should_inform_monitor() for SCSI commands Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 13/26] ufs: core: Change the monitor function argument types Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 14/26] ufs: core: Rework ufshcd_mcq_compl_pending_transfer() Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 15/26] ufs: core: Rework ufshcd_eh_device_reset_handler() Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 16/26] ufs: core: Allocate more commands for the SCSI host Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 17/26] ufs: core: Allocate the SCSI host earlier Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 18/26] ufs: core: Call ufshcd_init_lrb() later Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 19/26] ufs: core: Use hba->reserved_slot Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 20/26] ufs: core: Make the reserved slot a reserved request Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 21/26] ufs: core: Do not clear driver-private command data Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 22/26] ufs: core: Optimize the hot path Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 23/26] ufs: core: Pass a SCSI pointer instead of an LRB pointer Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 24/26] ufs: core: Remove the ufshcd_lrb task_tag member Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 25/26] ufs: core: Make blk_mq_tagset_busy_iter() skip reserved requests Bart Van Assche
2025-08-27 0:06 ` [PATCH v3 26/26] ufs: core: Switch to scsi_get_internal_cmd() 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=883d6a67-40f8-4a13-a433-d452d0c75571@acm.org \
--to=bvanassche@acm.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=john.g.garry@oracle.com \
--cc=john.garry@huawei.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/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;
as well as URLs for NNTP newsgroup(s).