From: Eli Cohen <eli-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
To: Yann Droneaud <ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@public.gmane.org>
Cc: cait-DpaxOq6QOWMAvxtiuMwx3w@public.gmane.org,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: rdma_create_qp() and max_send_wr
Date: Thu, 19 May 2011 09:07:04 +0300 [thread overview]
Message-ID: <20110519060704.GA2659@mtldesk30> (raw)
In-Reply-To: <1303467645.2243.47.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
Hi Yan,
it appears that you're using quite an old firmware. Could you upgrade
the firmware to the latest version and check again the failure to
create a QP with the max depth. FW and burning tools can be downloaded
from www.mellanox.com.
Another possible reason for the failures you were seeing is the 4 MB
limit on locking memory from usersapce. Could you repeat the
experiment as root?
P.S: I checked on my setup and was able to create a QP with the max
size.
On Fri, Apr 22, 2011 at 12:20:45PM +0200, Yann Droneaud wrote:
> Hi,
>
> Le jeudi 21 avril 2011 à 11:53 -0700, cait-DpaxOq6QOWMAvxtiuMwx3w@public.gmane.org a écrit :
> > An ENOMEM return does not mean that the subsystem *just* failed to
> > allocate system memory.
>
> > The memory that could not be allocated could be device memory.
> >
>
> I'm also having some difficulties with system memory allocation.
>
> In my test, a user is allowed to lock 4MBytes of memory, but not all
> this memory is available to ibv_reg_mr() since ibv_create_cq() and
> ibv_create_qp()/rdma_create_qp() lock memory respectively for CQ and QP.
> The question is how much memory is needed for the CQ and QP queues ?
>
> In my case, the maximum message of size is 4MBytes - 20KBytes, for a CQ
> and QP (half duplex) queues length of 1.
>
> Using message size of 128 bytes and less hit the QP WR limit of 16351
> length.
>
> When using messages of size 256 bytes, I'm only able to register 2609152
> bytes, then CQ and QP (half duplex) queues are 10192 entries length. So
> they seems to requires about 1585152 bytes. Taking in account a fixed
> amount of reserved memory of 20KBytes, this give about 154 bytes per (CQ
> + QP (half duplex)) entry.
>
> When doing the same math with size 512 and 1024, the size of (CQ + QP
> (half duplex)) is going down.
>
> msg 512 memory 3395584 length 6632
> msg 1024 memory 3788800 length 3700
> msg 2048 memory 3985408 length 1946
>
> Note that the memory used for the message is allocated as an aligned big
> chunk and registered as whole, and then sliced to be posted in WR.
>
> But the memory required for the CQ and QP elements (and other) is also
> subject to alignment to a page size.
>
> At least, I known that CQ / QP "overhead" is not going to hurt users, if
> they are allocated "modern" memory limits, let's say 1GBytes ;)
>
> Regards.
>
> --
> Yann Droneaud
> OPTEYA
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-05-19 6:07 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110421115323.48b52fb35c6f209c51bccbb9807b6df0.f623dc4952.wbe@email17.secureserver.net>
[not found] ` <20110421115323.48b52fb35c6f209c51bccbb9807b6df0.f623dc4952.wbe-L1BP6xego3TShzhksYgB+AejPw4fNl8p@public.gmane.org>
2011-04-22 10:20 ` rdma_create_qp() and max_send_wr Yann Droneaud
[not found] ` <1303467645.2243.47.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
2011-04-22 10:37 ` Yann Droneaud
2011-05-19 6:07 ` Eli Cohen [this message]
2011-05-19 9:17 ` Yann Droneaud
[not found] ` <1305796637.2359.6.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
2011-05-19 9:34 ` Eli Cohen
2011-05-19 10:50 ` Yann Droneaud
[not found] ` <1305802216.2359.11.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
2011-05-19 14:25 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373FE8B-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-05-19 14:45 ` Yann Droneaud
[not found] ` <1305816321.2359.15.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
2011-05-19 15:03 ` Yann Droneaud
[not found] ` <1305817426.2359.23.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
2011-05-19 15:46 ` Eli Cohen
2011-05-19 16:59 ` Yann Droneaud
[not found] ` <1305824364.2359.37.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
2011-05-19 17:13 ` Yann Droneaud
2011-05-19 18:06 ` Hefty, Sean
[not found] ` <1828884A29C6694DAF28B7E6B8A82373FF57-P5GAC/sN6hmkrb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2011-05-19 19:37 ` Eli Cohen
2011-04-21 16:44 Yann Droneaud
[not found] ` <1303404264.2243.19.camel-H/AUWmsJYVeqvyCYKW+Xr6xOck334EZe@public.gmane.org>
2011-04-21 18:35 ` Roland Dreier
[not found] ` <BANLkTikUOv3mtgb3x_vbbk845_36fu1QhA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-05-22 6:46 ` Or Gerlitz
[not found] ` <4DD8B13D.4070802-VPRAkNaXOzVWk0Htik3J/w@public.gmane.org>
2011-05-22 8:21 ` Eli Cohen
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=20110519060704.GA2659@mtldesk30 \
--to=eli-ldsdmyg8hgv8yrgs2mwiifqbs+8scbdb@public.gmane.org \
--cc=cait-DpaxOq6QOWMAvxtiuMwx3w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=ydroneaud-RlY5vtjFyJ3QT0dZR+AlfA@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.