Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH v3 6/6] nvme-rdma: implement polling queue map
Date: Fri, 14 Dec 2018 16:46:32 +0100	[thread overview]
Message-ID: <20181214154632.GC24417@lst.de> (raw)
In-Reply-To: <20181213213410.9841-7-sagi@grimberg.me>

> +static bool nvme_rdma_poller_queue(struct nvme_rdma_queue *queue)

Can we please make this poll_queue?  or at least polled_queue?
poller sounds odd..

> -		set->nr_maps = 2 /* default + read */;
> +		set->nr_maps = HCTX_MAX_TYPES;
>  	}
>  
>  	ret = blk_mq_alloc_tag_set(set);
> @@ -864,6 +881,10 @@ static int nvme_rdma_configure_io_queues(struct nvme_rdma_ctrl *ctrl, bool new)
>  			ret = PTR_ERR(ctrl->ctrl.connect_q);
>  			goto out_free_tag_set;
>  		}
> +
> +		if (ctrl->ctrl.opts->nr_poll_queues)
> +			blk_queue_flag_set(QUEUE_FLAG_POLL,
> +				ctrl->ctrl.connect_q);

The block core is supposed to detect we can poll based on nr_maps > 2,
and then set QUEUE_FLAG_POLL automatically.  Although I got the details
wrong for PCI as well, but I just sent a fix..
> +static int nvme_rdma_poll(struct blk_mq_hw_ctx *hctx)
> +{
> +	struct nvme_rdma_queue *queue = hctx->driver_data;
> +	struct ib_cq *cq = queue->ib_cq;
> +
> +	return ib_process_cq_direct(cq, -1);

I think we can skip the cq local variable here.

Otherwise this looks really nice and simple, thanks for looking into it!

Do you have any performance number, especially with Jens' ringbuffer
code?

  reply	other threads:[~2018-12-14 15:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-13 21:34 [PATCH v3 0/6] restore nvme-rdma polling Sagi Grimberg
2018-12-13 21:34 ` [PATCH v3 1/6] block: clear REQ_HIPRI if polling is not supported Sagi Grimberg
2018-12-13 21:34 ` [PATCH v3 2/6] block: make request_to_qc_t public Sagi Grimberg
2018-12-14 15:43   ` Christoph Hellwig
2018-12-14 16:52   ` Jens Axboe
2018-12-13 21:34 ` [PATCH v3 3/6] nvme-core: optionally poll sync commands Sagi Grimberg
2018-12-14 15:44   ` Christoph Hellwig
2018-12-13 21:34 ` [PATCH v3 4/6] nvme-fabrics: allow nvmf_connect_io_queue to poll Sagi Grimberg
2018-12-13 21:34 ` [PATCH v3 5/6] nvme-fabrics: allow user to pass in nr_poll_queues Sagi Grimberg
2018-12-13 21:34 ` [PATCH v3 6/6] nvme-rdma: implement polling queue map Sagi Grimberg
2018-12-14 15:46   ` Christoph Hellwig [this message]
2018-12-14 18:59     ` Sagi Grimberg

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=20181214154632.GC24417@lst.de \
    --to=hch@lst.de \
    /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