From: Kashyap Desai <kashyap.desai@broadcom.com>
To: dgilbert@interlog.com
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
Hannes Reinecke <hare@suse.de>
Subject: RE: [PATCH v3] scsi_debug: add new defer_type for mq_poll
Date: Thu, 11 Feb 2021 17:43:01 +0530 [thread overview]
Message-ID: <3253ac6a020bd3c36ed03519c4182250@mail.gmail.com> (raw)
In-Reply-To: <c9084cf7-4f75-dc62-1927-a2695f6cc52c@interlog.com>
[-- Attachment #1: Type: text/plain, Size: 2255 bytes --]
> Kashyap,
> There is another issue here, namely iodepth > host_max_queue (64 > 32) and
> in my setup that is not handled well. So there is a problem with
> scsi_debug
> *** or the mid-level in handling this case.
>
> If you have modified the sd driver to call blk_poll() then perhaps you
> could try
> the above test again with a reduced iodepth.
Doug -
I debug the issue and found the fix. We need to remove below code to handle
this new defer type for mq poll.
Earlier I did not used " REQ_HIPRI" to handle mq poll, but now you are
managing it through REQ_HIPRI check, it is safe and required to have below
patch.
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index b9ec3a47fbf1..c50de49a2c2f 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -5437,13 +5437,6 @@ static int schedule_resp(struct scsi_cmnd *cmnd,
struct sdebug_dev_info *devip,
sd_dp = sqcp->sd_dp;
spin_unlock_irqrestore(&sqp->qc_lock, iflags);
- /* Do not complete IO from default completion path.
- * Let it to be on queue.
- * Completion should happen from mq_poll interface.
- */
- if ((sqp - sdebug_q_arr) >= (submit_queues - poll_queues))
- return 0;
-
if (!sd_dp) {
sd_dp = kzalloc(sizeof(*sd_dp), GFP_ATOMIC);
if (!sd_dp) {
On top of your v3 patch + above fix, I am able to run IO and there are no
issues. There is no issue with higher QD as well, so we are good to go.
Tested-by: Kashyap Desai <kashyap.desai@broadcom.com>
So how shall we progress now ? Shall I ask Martin to pick all the patches
from " [PATCH v3 0/4] io_uring iopoll in scsi layer" since this patch has
dependency on my series.
Kashyap
>
> Doug Gilbert
>
> *** the scsi_debug should either yield a TASK SET FULL status or return
> SCSI_MLQUEUE_HOST_BUSY from queuecommand() when it has run out of
> slots.
>
> > [seqprecon]
> > filename=/dev/sdd
> > [seqprecon]
> > filename=/dev/sde
> > [seqprecon]
> > filename=/dev/sdf
> >
> >
> > I will ask Martin to pick all the patches from "[v3,1/4] add io_uring
> > with IOPOLL support in the scsi layer" except scsi_debug. We can work
> > on scsi_debug and send standalone patch.
> >
> > Kashyap
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4169 bytes --]
next prev parent reply other threads:[~2021-02-11 12:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 22:56 [PATCH v3] scsi_debug: add new defer_type for mq_poll Douglas Gilbert
2021-02-10 3:08 ` Kashyap Desai
2021-02-10 17:31 ` Douglas Gilbert
2021-02-11 5:56 ` Douglas Gilbert
2021-02-11 12:13 ` Kashyap Desai [this message]
2021-02-11 16:11 ` Douglas Gilbert
2021-02-12 11:11 ` Kashyap Desai
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=3253ac6a020bd3c36ed03519c4182250@mail.gmail.com \
--to=kashyap.desai@broadcom.com \
--cc=dgilbert@interlog.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.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