From: Kashyap Desai <kashyap.desai@broadcom.com>
To: Hannes Reinecke <hare@suse.de>, linux-scsi@vger.kernel.org
Cc: Sumit Saxena <sumit.saxena@broadcom.com>,
Chandrakanth Patil <chandrakanth.patil@broadcom.com>,
linux-block@vger.kernel.org
Subject: RE: [PATCH v2 2/4] megaraid_sas: iouring iopoll support
Date: Mon, 1 Feb 2021 19:25:34 +0530 [thread overview]
Message-ID: <534865e428d0452f3355e05fd55b4138@mail.gmail.com> (raw)
In-Reply-To: <379caf31-6158-cb4b-325e-0be3b79b97b9@suse.de>
[-- Attachment #1: Type: text/plain, Size: 3147 bytes --]
> > static int megasas_map_queues(struct Scsi_Host *shost)
> > {
> > struct megasas_instance *instance;
> > + int i, qoff, offset;
> >
> > instance = (struct megasas_instance *)shost->hostdata;
> >
> > if (shost->nr_hw_queues == 1)
> > return 0;
> >
> > - return blk_mq_pci_map_queues(&shost-
> >tag_set.map[HCTX_TYPE_DEFAULT],
> > - instance->pdev, instance->low_latency_index_start);
> > + offset = instance->low_latency_index_start;
> > +
> > + for (i = 0, qoff = 0; i < HCTX_MAX_TYPES; i++) {
> > + struct blk_mq_queue_map *map = &shost->tag_set.map[i];
> > +
> > + map->nr_queues = 0;
> > +
> > + if (i == HCTX_TYPE_DEFAULT)
> > + map->nr_queues = instance->msix_vectors - offset;
> > + else if (i == HCTX_TYPE_POLL)
> > + map->nr_queues = instance->iopoll_q_count;
> > +
> > + if (!map->nr_queues) {
> > + BUG_ON(i == HCTX_TYPE_DEFAULT);
> > + continue;
> > + }
> > +
> > + /*
> > + * The poll queue(s) doesn't have an IRQ (and hence IRQ
> > + * affinity), so use the regular blk-mq cpu mapping
> > + */
> > + map->queue_offset = qoff;
> > + if (i != HCTX_TYPE_POLL)
> > + blk_mq_pci_map_queues(map, instance->pdev,
> offset);
> > + else
> > + blk_mq_map_queues(map);
> > +
> > + qoff += map->nr_queues;
> > + offset += map->nr_queues;
> > + }
> > +
> Seeing that you only ever use HCTX_TYPE_DEFAULT and HCTX_TYPE_POLL
> that loop is a bit non-obvious; maybe it's better to unroll it and assigne
> the
> values manually.
Hannes- I have taken care this in V3 series. Please review.
> > /**
> > * megasas_enable_irq_poll() - enable irqpoll
> > * @instance: Adapter soft state
>
> Double newline
Taken care in V3.
>
> > @@ -4164,6 +4203,8 @@ void megasas_reset_reply_desc(struct
> > megasas_instance *instance)
> >
> > fusion = instance->ctrl_context;
> > count = instance->msix_vectors > 0 ? instance->msix_vectors : 1;
> > + count += instance->iopoll_q_count;
> > +
> > for (i = 0 ; i < count ; i++) {
> > fusion->last_reply_idx[i] = 0;
> > reply_desc = fusion->reply_frames_desc[i]; diff --git
> > a/drivers/scsi/megaraid/megaraid_sas_fusion.h
> > b/drivers/scsi/megaraid/megaraid_sas_fusion.h
> > index 30de4b01f703..242ff58a3404 100644
> > --- a/drivers/scsi/megaraid/megaraid_sas_fusion.h
> > +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.h
> > @@ -1303,6 +1303,9 @@ struct fusion_context {
> > u8 *sense;
> > dma_addr_t sense_phys_addr;
> >
> > + atomic_t busy_mq_poll[MAX_MSIX_QUEUES_FUSION];
> > +
> > +
> > dma_addr_t reply_frames_desc_phys[MAX_MSIX_QUEUES_FUSION];
> > union MPI2_REPLY_DESCRIPTORS_UNION
> *reply_frames_desc[MAX_MSIX_QUEUES_FUSION];
> > struct rdpq_alloc_detail rdpq_tracker[RDPQ_MAX_CHUNK_COUNT];
> >
> Same here.
Taken care in V3.
>
> Cheers,
>
> Hannes
> --
> Dr. Hannes Reinecke Kernel Storage Architect
> hare@suse.de +49 911 74053 688
> SUSE Software Solutions GmbH, Maxfeldstr. 5, 90409 Nürnberg HRB 36809
> (AG Nürnberg), Geschäftsführer: Felix Imendörffer
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4169 bytes --]
next prev parent reply other threads:[~2021-02-01 13:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-03 3:40 [PATCH v2 0/4] io_uring iopoll in scsi layer Kashyap Desai
2020-12-03 3:40 ` [PATCH v2 1/4] add io_uring with IOPOLL support " Kashyap Desai
2020-12-03 12:51 ` Hannes Reinecke
2020-12-04 8:53 ` John Garry
2020-12-03 3:40 ` [PATCH v2 2/4] megaraid_sas: iouring iopoll support Kashyap Desai
2020-12-03 12:57 ` Hannes Reinecke
2021-02-01 13:55 ` Kashyap Desai [this message]
2020-12-03 13:23 ` kernel test robot
2020-12-03 3:40 ` [PATCH v2 3/4] scsi_debug : " Kashyap Desai
2020-12-03 12:58 ` Hannes Reinecke
2020-12-03 19:09 ` Douglas Gilbert
2020-12-03 3:41 ` [PATCH v2 4/4] scsi: set shost as hctx driver_data Kashyap Desai
2020-12-03 13:26 ` John Garry
2020-12-03 13:30 ` Kashyap Desai
2020-12-04 9:00 ` John Garry
2021-01-11 12:15 ` [PATCH v2 0/4] io_uring iopoll in scsi layer Kashyap Desai
2021-01-13 3:55 ` Martin K. Petersen
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=534865e428d0452f3355e05fd55b4138@mail.gmail.com \
--to=kashyap.desai@broadcom.com \
--cc=chandrakanth.patil@broadcom.com \
--cc=hare@suse.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sumit.saxena@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