From: hch@lst.de (Christoph Hellwig)
Subject: [PATCH v2] nvme-rdma: Use mr pool
Date: Mon, 20 Nov 2017 09:09:51 +0100 [thread overview]
Message-ID: <20171120080951.GA27552@lst.de> (raw)
In-Reply-To: <1510674794-3800-1-git-send-email-israelr@mellanox.com>
> @@ -495,8 +457,26 @@ static int nvme_rdma_create_queue_ib(struct nvme_rdma_queue *queue)
> goto out_destroy_qp;
> }
>
> + if (idx == 0)
> + queue->ctrl->max_fr_pages = min_t(u32, NVME_RDMA_MAX_SEGMENTS,
> + ibdev->attrs.max_fast_reg_page_list_len);
> +
Hmm. Why is this code moved here from nvme_rdma_configure_admin_queue?
I really don't like per-controller initialization in per-queue functions
but if there is no good way around it it needs a very good explanation,
and that explanation should be in a comment place next to the code.
> + req->mr = ib_mr_pool_get(queue->qp, &queue->qp->rdma_mrs);
> + if (unlikely(!req->mr))
> + return -EAGAIN;
> +
Shouldn't the MR pool be sized that this always succeeds? If so a
WARN_ON_ONCE() here might be useful.
next prev parent reply other threads:[~2017-11-20 8:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 15:53 [PATCH v2] nvme-rdma: Use mr pool Israel Rukshin
2017-11-20 8:09 ` Christoph Hellwig [this message]
2017-11-20 11:32 ` 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=20171120080951.GA27552@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