From: Kashyap Desai <kashyap.desai@broadcom.com>
To: Ming Lei <ming.lei@redhat.com>, Jens Axboe <axboe@kernel.dk>
Cc: Bart Van Assche <bvanassche@acm.org>,
linux-block <linux-block@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Suganath Prabu Subramani <suganath-prabu.subramani@broadcom.com>,
Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
Sathya Prakash Veerichetty <sathya.prakash@broadcom.com>
Subject: RE: +AFs-PATCH+AF0- blk-mq: Set request mapping to NULL in blk+AF8-mq+AF8-put+AF8-driver+AF8-tag
Date: Tue, 11 Dec 2018 20:36:49 +0530 [thread overview]
Message-ID: <1c6b4131aea4d2efa19d5ce0584bf6e3@mail.gmail.com> (raw)
In-Reply-To: 88ed84836a807d5102f9164fceb157ac@mail.gmail.com
> > On Thu, Dec 06, 2018 at 11:15:13AM +0530, Kashyap Desai wrote:
> > > >
> > > > If the 'tag' passed to scsi_host_find_tag() is valid, I think
there
> > > > shouldn't have such issue.
> > > >
> > > > If you want to find outstanding IOs, maybe you can try
> > > > blk_mq_queue_tag_busy_iter()
> > > > or blk_mq_tagset_busy_iter(), because you may not know if the
passed
> > > 'tag'
> > > > to
> > > > scsi_host_find_tag() is valid or not.
> > >
> > > We tried quick change in mpt3sas driver using
blk_mq_tagset_busy_iter
> and
> > > it returns/callback for valid requests (no stale entries are
returned).
> > > Expected.
> > > Above two APIs are only for blk-mq. What about non-mq case ? Driver
> > > should use scsi_host_find_tag for non-mq and blk_mq_tagset_busy_iter
> for
> > > blk-mq case ?
> >
> > But your patch is only for blk-mq, is there same issue on non-mq case?
>
> Problematic part from below function is code path which goes from "
> shost_use_blk_mq(shost))".
> Non-mq path works fine because every IO completion set
bqt->tag_index[tag]
> = NULL from blk_queue_end_tag().
>
> I did similar things for mq path in this patch.
>
> static inline struct scsi_cmnd *scsi_host_find_tag(struct Scsi_Host
*shost,
> int tag)
> {
> struct request *req = NULL;
>
> if (tag == SCSI_NO_TAG)
> return NULL;
>
> if (shost_use_blk_mq(shost)) {
> u16 hwq = blk_mq_unique_tag_to_hwq(tag);
>
> if (hwq < shost->tag_set.nr_hw_queues) {
> req = blk_mq_tag_to_rq(shost->tag_set.tags[hwq],
> blk_mq_unique_tag_to_tag(tag));
> }
> } else {
> req = blk_map_queue_find_tag(shost->bqt, tag);
> }
Hi Jens,
Any conclusion/feedback on this topic/patch ? As discussed, This is a
safe change and good to have if no design issue.
Kashyap
next prev parent reply other threads:[~2018-12-11 15:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 10:00 [PATCH] blk-mq: Set request mapping to NULL in blk_mq_put_driver_tag Kashyap Desai
2018-12-04 11:35 ` Ming Lei
2018-12-04 16:51 ` Kashyap Desai
2018-12-04 14:48 ` Bart Van Assche
2018-12-04 16:47 ` Kashyap Desai
2018-12-04 17:14 ` Bart Van Assche
2018-12-04 18:18 ` +AFs-PATCH+AF0- blk-mq: Set request mapping to NULL in blk+AF8-mq+AF8-put+AF8-driver+AF8-tag Kashyap Desai
2018-12-04 19:35 ` Bart Van Assche
2018-12-06 0:33 ` Ming Lei
2018-12-06 5:45 ` Kashyap Desai
2018-12-06 15:22 ` Jens Axboe
2018-12-07 7:16 ` Kashyap Desai
2018-12-07 10:20 ` Ming Lei
2018-12-07 10:34 ` Kashyap Desai
2018-12-11 15:06 ` Kashyap Desai [this message]
2018-12-14 6:22 ` 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=1c6b4131aea4d2efa19d5ce0584bf6e3@mail.gmail.com \
--to=kashyap.desai@broadcom.com \
--cc=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=ming.lei@redhat.com \
--cc=sathya.prakash@broadcom.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.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).