From: Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH] RDMA/cxgb3: fail get_dma_mr if the memory footprint can exceed 32b
Date: Thu, 23 Jul 2015 17:32:45 -0400 [thread overview]
Message-ID: <55B15D7D.3090601@redhat.com> (raw)
In-Reply-To: <20150722191417.9306.17387.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1486 bytes --]
On 07/22/2015 03:14 PM, Steve Wise wrote:
> T3 HW only supports MRs of length < 4GB. If the system can have more
> than that we need to fail dma mr allocation so we con't create a MR that
> cannot span the entire possible memory space.
>
> Signed-off-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
> ---
>
> drivers/infiniband/hw/cxgb3/iwch_provider.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/infiniband/hw/cxgb3/iwch_provider.c b/drivers/infiniband/hw/cxgb3/iwch_provider.c
> index b1b7323..bbbe018 100644
> --- a/drivers/infiniband/hw/cxgb3/iwch_provider.c
> +++ b/drivers/infiniband/hw/cxgb3/iwch_provider.c
> @@ -736,6 +736,10 @@ static struct ib_mr *iwch_get_dma_mr(struct ib_pd *pd, int acc)
> /*
> * T3 only supports 32 bits of size.
> */
> + if (sizeof(phys_addr_t) > 4) {
> + pr_warn_once(MOD "Cannot support dma_mrs on this platform.\n");
> + return ERR_PTR(-ENOTSUPP);
> + }
> bl.size = 0xffffffff;
> bl.addr = 0;
> kva = 0;
Should this be a static check of the pointer size versus installed
memory? Would it be possible to have this work for machines with less
than 4GB of physical memory even if they have 64bit pointers, or are you
concerned that hotplug memory could take us over the limit after
registration and cause problems?
--
Doug Ledford <dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
GPG KeyID: 0E572FDD
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 884 bytes --]
next prev parent reply other threads:[~2015-07-23 21:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 19:14 [PATCH] RDMA/cxgb3: fail get_dma_mr if the memory footprint can exceed 32b Steve Wise
[not found] ` <20150722191417.9306.17387.stgit-PBeJgSbIpn97NCTnQtmixQ@public.gmane.org>
2015-07-23 21:32 ` Doug Ledford [this message]
[not found] ` <55B15D7D.3090601-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-07-23 22:47 ` Steve Wise
2015-07-24 14:44 ` Doug Ledford
[not found] ` <55B24F65.5040103-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2015-07-24 14:50 ` Steve Wise
2015-07-24 14:55 ` Doug Ledford
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=55B15D7D.3090601@redhat.com \
--to=dledford-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.